Power zoom lens and camera system having same

ABSTRACT

A camera system that includes a taking lens having a motor drive mechanism and a control mechanism for controlling the motor drive mechanism, and a camera body to which the taking lens is detachably mounted. The camera system has a power supply that is provided in the camera body. Power supplying circuits provided in the camera body and the taking lens independently supply the motor drive mechanism and the control mechanism with electrical power. An abnormal power supply detecting device in the taking lens detects an abnormality in the supply of power to the motor drive mechanism, and a power cutting device in the camera body cuts the power supply to the motor drive mechanism when the abnormal power supply detecting device detects an abnormality in the power supply.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a power zoom lens including anautomatic focusing device and a power zooming device, and a camerasystem having such a power zoom lens.

This application is related to the commonly assigned applications U.S.Ser. No. 07/410,880, 07/652,038, 07/407424, 07/414477, 07/41478,07/670733, 07/406523, and 07/414476, the disclosures of which areexpressly incorporated by reference herein.

2. Description of Related Art

There are various known lens shutter type cameras having automaticfocusing devices and power zoom lenses with zoom motors. In an automaticfocusing device in a single lens reflex camera, a focusing lens unit ismoved by an AF motor in accordance with a detection signal outputtedfrom a focus detecting device.

However, a single lens reflex camera having a power zoom lens has notbeen realized, since the provision of the power zoom lens not onlycomplicates the mechanical construction of the camera body and theelectrical connection to the camera body, but also makes it difficult torealize a simple interchangeable mechanism which is capable ofconnecting a conventional camera body to interchangeable lenses.

Furthermore, in a conventional single lens reflex camera, the drive ofthe AF motor is controlled by a CPU (microcomputer) provided in thecamera body. It is also known to provide the AF motor in a taking lens,wherein electrical drive power is supplied to the AF motor by a batteryprovided in the camera body (e.g., Japanese Kokoku No. HEI 4-1554).

In this known single lens reflex camera, the power needed to drive theAF motor provided in the taking lens and the power needed to actuate alens control circuit to control the AF motor are supplied to the takinglens from the camera body through common electrical terminals.Accordingly, if power cannot be appropriately supplied for some reason,for example, if there is a problem with the AF motor, the lens controlcircuit will not operate properly. If this occurs, the microcomputerprovided in the camera body will cut the power supply to the takinglens.

The fact that an abnormal operation is occurring can be detected.However, it is impossible to identify the source of the trouble (e.g.,the AF motor or lens control circuit) or the exact cause of the trouble(e.g., failure of electrical connection). Furthermore, once troubleoccurs, the power supply to both the AF motor and the lens controlcircuit is cut, even if, for example, the control circuit normallyworks.

SUMMARY OF THE INVENTION

A primary object of the present invention is to provide a camera systemhaving a camera body and an interchangeable taking lens which can bedetachably mounted to the camera body, wherein the power supply from thecamera body to the taking lens to drive the AF motor and control thelens control circuit can be independently effected, and wherein cuttingof the power supply to the AF motor and the lens control circuit can beindependently effected.

To achieve the object mentioned above, according to the presentinvention, there is provided a camera system that includes a taking lenshaving a motor drive means and a control means for controlling the motordrive means, and a camera body to which the taking lens is detachablymounted. The camera system comprises a power supply that is provided inthe camera body, power supplying circuits provided in the camera bodyand the taking lens to independently supply the motor drive means andthe control means with electrical power, an abnormal power supplydetecting means in the taking lens for detecting an abnormality of thepower supply to the motor drive means, and a power cutting means in thecamera body for cutting the power supply to the motor drive means whenthe abnormal power supply detecting means detects an abnormality of thepower supply.

The present disclosure relates to subject matter contained in Japanesepatent application Nos. HEI 3-218146 filed on May 21, 1991) and HEI3-218146 (filed on Nov. 29, 1991) which are expressly incorporatedherein by reference in its entirety.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an outline of one embodiment of a bodyof a single lens reflex camera to which the invention is applied;

FIG. 2 is a block diagram showing an outline of one embodiment of apowered zoom lens for a single lens reflex camera to which the inventionis applied;

FIG. 3 is a block diagram illustrating one embodiment of a circuitconstruction for the powered zoom lens;

FIG. 4 is a developed plan view of a zoom code plate of the powered zoomlens;

FIG. 5 is a a developed plan view of a focal length code plate of thepowered zoom lens.

FIGS. 6 and 7 are a main flow chart of a lens CPU;

FIG. 8 is a flow chart regarding communication interruption of the lensCPU of FIGS. 6 and 7;

FIG. 9 is a flow chart regarding a 2 ms timer interruption;

FIG. 10 is a flow chart regarding a powered zoom/manual zoom operation;

FIG. 11 is a flow chart regarding a PWM 2 ms timer interruption;

FIG. 12 is a flow chart regarding a PZ pulse count interruptiontreatment;

FIG. 13 is a flow chart regarding a PWM interruption;

FIG. 14 is a time chart regarding a PWM control;

FIGS. 15 and 16 are flow charts regarding a zoom control under constantimage magnification;

FIGS. 17 and 18 are flow charts of a predictor operation regarding anamount of defocus;

FIG. 19 is a flow chart regarding a standby operation;

FIG. 20 is a flow chart regarding an initializing operation for an AFpulse;

FIG. 21 is a flow chart regarding an initialization operation for apowered zoom position;

FIG. 22 is a flow chart regarding an accommodation operation for thepowered zoom lens;

FIG. 23 is a flow chart regarding a return operation for the poweredzoom lens;

FIG. 24 is a flow chart regarding a stop operation for the powered zoom;

FIG. 25 is a flow chart that is effective upon receipt of data requiredfor constant image magnification zooming;

FIG. 26 is a flow chart regarding a constant image magnification zoomingoperation;

FIG. 27 is a flow chart that is effective upon receipt of inputinformation regarding constant image magnification zooming;

FIG. 28 is a flow chart that is effective upon receipt of an inputregarding a condition of a camera body;

FIG. 29 is a flow chart that is effective upon receipt of inputregarding body sequence information;

FIG. 30 is a flow chart that is effective upon receipt of an inputregarding an AF pulse from the camera body side;

FIG. 31 is a flow chart that is effective upon receipt of an inputregarding a PZ pulse from the camera body;

FIG. 32 is a flow chart that is effective upon receipt of a commandwhich memorizes AF pulse data counted in the lens;

FIG. 33 is a flow chart regarding an operation for storing a defocusamount, determined by an AF on the body side, in a lens memory;

FIG. 34 is a flow chart regarding a storing operation for designated PZpulse data and focal length data;

FIG. 35 is a flow chart regarding an operation for storing a defocusamount obtained in the AF on the body side in the lens memory;

FIG. 36 is a flow chart regarding an operation for storing constantimage magnification zooming data received from the camera body;

FIG. 37 is a flow chart regarding a powered zooming in a designateddirection or to a designated position;

FIG. 38 is a flow chart regarding the powered zooming operation based onthe data designated by the camera body;

FIGS. 39, 40, 41, 42 and 43 are a lens flow chart regarding an AF pulsecount operation;

FIG. 44 is a flow chart regarding a transmission operation for the powerzooming data on the photographing lens side.

FIG. 45 is a flow chart regarding a standby operation for thephotographing lens;

FIG. 46 is a flow chart regarding a transmission operation for variabledata of the photographing lens;

FIG. 47 is a flow chart regarding a transmission operation for fixedinformation of the photographing lens;

FIG. 48 is a flow chart regarding a transmission operation for an AFpulse count value on the lens side;

FIG. 49 is a flow chart regarding an output operation for real focallength data of the photographing lens;

FIG. 50 is a flow chart regarding a transmission operation for constantimage magnification data on the photographing lens side;

FIG. 51 is a flow chart regarding the output of all lens data;

FIGS. 52, 53, 54, and 55 are a flow chart regarding a PZ actuationoperation;

FIG. 56 is a flow chart regarding an initialization operation for thePZ;

FIGS. 57 and 58 are a flow chart regarding an initialization operationfor the AF;

FIG. 59 is a flow chart regarding an operation for checking a supply ofelectricity;

FIGS. 60A, 60B, and 61 are a flow chart regarding a loop operation forthe PZ;

FIG. 62 is a flow chart regarding an operation for checking for thecompletion of preset powered zooming;

FIGS. 63 and 64 are a flow chart showing a first embodiment of aconstant image magnification zooming;

FIGS. 65 and 66 are a flow chart showing a second embodiment of constantimage magnification zooming;

FIGS. 67 and 68 are a flow chart showing a third embodiment of constantimage magnification zooming;

FIG. 69 is a flow chart regarding an operation for an AF pulse count.

FIG. 70 is a flow chart regarding an operation for adjusting an AF pulsecount value;

FIG. 71 is a flow chart regarding an operation for a PZ terminal point;

FIG. 72 is a flow chart regarding an operation for controlling arotational direction and rotational speed of a zoom motor;

FIGS. 73, 74, and 75 are a flow chart regarding a powered zoomingoperation by a zoom switch;

FIG. 76 is a flow chart regarding an interruption treatment for a PZpulse count;

FIG. 77 is a flow chart regarding an operation for stopping a poweredzooming;

FIG. 78 is a flow chart regarding an operation for braking the zoommotor;

FIGS. 79 and 80 are a flow chart regarding an operation for setting astate of the photographing lens;

FIGS. 81 and 82 are a flow chart regarding a powered zooming towards adesignated focal length;

FIGS. 83 and 84 are a flow chart regarding an operation for adjusting adrive speed in accordance with a pulse number, which corresponds to atarget position;

FIG. 85 is a flow chart regarding an operation for correcting the PZpulse count when a terminal point is achieved;

FIG. 86 is a flow chart regarding an operation for correcting the PZpulse counter when an actual or present position of the zooming lens isunknown;

FIG. 87 is a flow chart regarding an operation for correcting the PZpulse counter when an actual or present position of the zooming lens isunknown;

FIG. 88 is a flow chart regarding an operation of the PZ pulse countwhen an actual or present position of the zooming lens is known;

FIG. 89 is a flow chart regarding an operation for correcting a PZ pulsecounter;

FIG. 90 is a flow chart regarding an operation for presetting a focallength;

FIG. 91 is a flow chart regarding a drive control for the zoom motor;

FIG. 92 is a flow chart regarding a release operation on the camera bodyside;

FIG. 93 is a timing chart regarding an inter-exposure zooming;

FIG. 94 is a flow chart regarding an operation for changing modes of apowered zooming;

FIG. 95 is a flow chart regarding an interruption operation for the PZpulse count; and

FIG. 96 is a flow chart regarding an operation for controlling a PWM ofa the zoom motor.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The invention will be explained below with reference to severalembodiments illustrated in the drawings. In the drawings, FIG. 1 is ablock diagram illustrating a main construction of the body portion of anautofocus (AF) single lens reflex camera to which the invention isapplied. FIG. 2 is a block diagram illustrating a main construction of apowered zoom lens to which the invention is applied. FIG. 3 is a blockdiagram of the powered zoom lens circuitry to which the invention isapplied.

The AF single lens reflex camera includes a camera body 11, and aphotographing lens (powered zoom lens) 51 that is releasably attached tothe camera body 11. Most of the luminous flux of an object to be taken(object flux) incident on the camera body 11 from a zooming opticalsystem 53 of the photographing lens 51 are reflected by a main mirror 13onto a pentaprism 15 constituting a finder optical system. A portion ofthe reflected light beam is also directed to a light receiving element(not shown) of a photometric IC. A portion of the object flux, havingbeen directed to the camera body 11 and made incident upon half mirrors13 and 14, passes through the half mirrors and is reflected downwardlyby a sub-mirror 19 to be directed onto a macrometric CCD sensor unit 21.

A photometric IC 17 includes a light receiving element for receiving theobject flux. An electric signal generated by the light receiving elementin accordance with the amount of light inputted into the light receivingelement is subject to logarithmic-compression and A/D conversion and isthen outputted, as a digital photometric signal, to a main (body) CPU35. The main CPU 35 performs a predetermined operation on the basis ofinformation, including the photometric signal and film speed, so as tocalculate an appropriate shutter speed and diaphragm value for exposure.An exposure mechanism (shutter mechanism) 25 and a diaphragm mechanism27 are driven on the basis of the shutter speed and diaphragm value.

Macrometric CCD sensor unit 21 is a macrometric sensor of a conventionalphase difference type (not shown). The unit 21 includes a split opticalsystem for splitting An object flux in half, and a CCD line sensor forreceiving the split object fluxes so as to integrate them (i.e., storingphotoelectric transfer and charges thereof). The macrometric CCD sensorunit 21 outputs data integrated by the CCD line sensor to the main CPU35. The macrometric CCD sensor unit 21 is driven by a control circuitfor peripheral parts 23. The macrometric CCD sensor unit 21 includes amonitor element. The peripheral parts control circuit 23 detects aluminance of the object (object luminance) through the monitor element,so as to change the integration time, based on the detected results.

Peripheral parts control circuit 23 performs a predetermined exposureoperation on the basis of the digital photometric signal and film speedinformation, so as to calculate an appropriate shutter speed anddiaphragm value for exposure. The exposure mechanism (shutter mechanism)25 and diaphragm mechanism 27 are driven on the basis of the shutterspeed and diaphragm value so as to perform an exposure. The peripheralparts control circuit 23, upon release, drives a mirror motor 31 bymeans of a motor drive circuit (motor drive IC) 29 so as to perform anup/down operation of the main mirror 13, and then drives a winding motor33 so as to wind a film after completion of exposure.

Main CPU 35 communicates with lens CPU 61 so as to transmit data,command, etc. through the connection with the peripheral parts controlcircuit 23, a group of electric contacts BC mounted on the mount surfaceof the camera body, and a group of electric contacts LC mounted on amount surface of powered zoom lens 51.

Main CPU 35 calculates a defocus amount by performing a predeterminedoperation (predictor operation) on the basis of the integrated dataoutputted from the macrometric CCD sensor unit 21, and calculates arotational direction and rotational speed (i.e., pulse number of anencoder 41) of an AF motor 39. The main CPU 35 drives the AF motor 39 bymeans of the AF motor drive circuit 37 on the basis of the aboverotational direction and pulse number.

Main CPU 35 counts a pulse that is outputted from the encoder 41 inaccordance with a rotation of the AF motor 39. When the count amountreaches the above pulse number, the main CPU 35 stops the AF motor 39.The main CPU 35 quickly accelerates the AF motor 39 upon initialactuation thereof. Thereafter, the main CPU 35 activates a DC drive modeto decelerate the motor 39, so as to stop the motor 39 when it arrivesat a target position. The main CPU 35 is capable of controlling the AFmotor 39 at a constant speed in accordance with the time between pulsesoutputted from the encoder 41. Rotational movement of the AF motor 39 istransmitted to an AF drive mechanism 55 of the photographing lens 51through a connection between an AF joint 47 mounted on the camera body11 and an AF joint 57 mounted on the photographing lens 51. A group offocusing lenses 53F is driven by the AF drive mechanism 55.

Main CPU 35 has incorporated therein a ROM 35a for storing a programtherein and a RAM 35b for storing predetermined data therein. An E² PROM43 is connected to the main CPU 35 as an external memory means. The E²PROM 43 stores various functions and constants necessary for theoperation or calculation of AF (autofocus) and PZ (power zoom), inaddition to various constants inherent to the camera body 11.

Also connected to the main CPU 35 are photometric switch SWS, which isturned ON upon a half-depression of a release button (not shown), and arelease switch SWR, which is turned ON upon a full-depression of therelease button, an autofocus switch SWAF, a main switch SWM, which turnsthe electric supply to the main CPU 35 and peripheral equipment ON/OFF,and an up-down switch SWUP/DOWN.

The set modes, such as AF mode, exposure mode and photographing mode,and exposure data, such as shutter speed and diaphragm value, aredisplayed on a display device 45 by means of the main CPU 35. Usually,the display device 45 is provided at two points, i.e., at points on theouter surface of the camera body 11 and in the field of view of afinder.

A pair of electric pins BPC for supplying electricity, obtained from abattery 20, to the photographing lens is provided adjacent to the mountof the camera body 11. A pair of electric pins LPC, which areelectrically connected with the electric pins BPC upon mounting, is alsoprovided on the powered zoom lens 51.

Powered zoom lens 51 includes, as a photographing optical system, azooming optical system 53, which has a group of focusing lenses 53F anda group of zooming lenses 53Z.

The group of focusing lenses 53F is driven by an AF mechanism 55. Thedriving force of the AF motor 39 is transmitted to the AF mechanism 55through the AF joints 57 and 47. An AF pulse outputted from an AF pulser59 in accordance with the rotation of the AF mechanism 55 is counted andmeasured by a lens CPU 61. The lens CPU 61 includes an AF pulse hardwarecounter for counting the AF pulse.

The group of zooming lenses 53Z is driven by a PZ (power zooming)mechanism 67. A zoom motor 65 for driving the PZ mechanism 67 iscontrolled by the lens CPU 61 via a motor drive IC 63. The amount ofdisplacement of the group of zooming lenses 53Z is counted and measuredby the lens CPU 61, which counts PZ pulse outputted from a PZ pulser 69in accordance with the rotational movement of zoom motor 65.

Pulsers 59 and 69 include a rotatable disk which has a plurality ofslits extending in a radial direction thereof and spaced in acircumferential direction in an equidistant manner, for example. Thepulsers 59 and 69 further include LEDs and photodiodes(photo-interrupter), each disposed at opposite sides of each of theslits. The rotatable disk of each of the pulsers 59 and 69 rotatessequentially with the rotation of the AF mechanism 55 and PZ mechanism67. The LED of each of the pulsers 59 and 69 is controlled by the lensCPU 61 to be turned ON/OFF and the output (pulse) of the photodiode isinputted to the lens CPU 61.

The absolute position of the group of zooming lenses 53Z (i.e., focallength) and the absolute position of the group of focusing lenses 53F(i.e., object distance to be focused upon) are detected by a zoom codeplate 71 and distance code plate 81, respectively. FIGS. 4 and 5illustrate developed views of the code plates 71 and 81, respectively.Brushes 73 and 85 slidably engage with an array of codes 71a-71f of thecode plate 71 and an array of codes 81a-81e of the code plate 81,respectively.

Code 71a and code 81a of the code plates 71 and 81, respectively, aregrounded. A plurality of codes 71b-71e and 81b-81e are connected to aninput port of the lens CPU 61. The total range of displacement of thegroup of zooming lenses 53Z is divided by the zoom code plate 71 into 26segments. Each of the segments is distinguished by an absolutepositional (i.e., focal length) information with 5 bits. The total rangeof displacement of the group of focusing lenses 53F is divided by thedistance code plate 81 into 8 segments. Each segment is distinguished byan absolute position (i.e., distance of object) information with 3 bits.The relative position in each divided segment is detected by countingthe pulse number outputted from the pulser 69 and 59. Indicia 83 of thearray of codes 81e of the distance code plate 81 is provided to detect acentral position of each of the segments. A boundary position 72 of eachsegment of the code plate 71 and the indicia 83 of the code plate 81 isused as a critical position at which point a count value of each of thepulsers is corrected.

Powered zoom lens 51 includes, as actuation switches, a switch 75 forchanging a zoom speed, and a switch 77 for changing a zoom mode. Thezoom speed changing switch 75 includes a switch (the detail of which isnot shown) which controls, in the powered zooming mode, a tele-directionzooming and a wide-direction zooming, and three zoom speed modes in eachof the zooming directions. The zoom mode changing switch 77 includes aswitch for changing between a powered zooming and a manual drivenzooming (D/M), a PA switch for changing between a manual powered zoomingmode and a plurality of powered zooming modes performed under a constantcontrol, and a SL switch for storing an actual focal length or the likeduring a controlled, powered zooming mode (i.e., powered zooming modeunder constant image magnification). Although not specifically shown inthe drawings, the zoom speed changing switch 75 will be actuatedsequentially with a zoom operating ring which is inserted into a lensbarrel for rotation and displacement in the optical axis direction, andwhich is normally urged toward a neutral position with respect to therotational direction. The zoom operating ring also includes a mechanismfor mechanically changing between the powered zooming and the manualzooming.

The contacts of the zoom speed changing switch 75 and zoom mode changingswitch 77 are connected to the lens CPU 61. The lens CPU performs acontrol operation with respect to the powered zooming in response to anactuation of the switches.

Lens CPU 61 is connected with the main CPU 35 through an interface 62,communication contacts LC and BC, and peripheral parts control circuit23 of the camera body, so as to perform a bi-directional communicationwith the main CPU 35 of predetermined data. The data to be transmittedfrom the lens CPU 61 to the main CPU 35 includes, for example, opendiaphragm value AVMIN, maximum diaphragm value AVMAX, minimum andmaximum focal length, actual focal length, actual distance of an object,K-value information, as well as, AF pulse number, PZ pulse number etc."K-value" is intended to be pulse number data of the encoder 41 (AFpulser 59) necessary to displace the image surface, imaged by thezooming optical system 53, by a unit length (for example, 1 mm).

FIG. 3 is a block diagram illustrating the circuit of the powered zoomlens 51 in more detail. A group of electric contacts LC includes 5terminals, i.e., CONT terminal connected to the interface 62, RESterminal SCK terminal, DATA terminal and GND terminal. Through the CONTterminal and GND terminal, a voltage necessary for the actuation of thelens CPU 61 is supplied from the camera body 11, and through theremaining terminals, i.e., RES terminal, SCK terminal and DATA terminal,communication is performed. In principle, the RES terminal is assignedto a reset signal, SCK terminal is assigned to a clock, and the DATAterminal is assigned to data communication, such as predeterminedinformation and commands. It is noted that any elements which aredenoted with this prefix correspond to an active-low or reversed signal.Electricity pin LPC includes a VBATT terminal and PGND terminal.Electric power necessary to drive the zoom motor 65 is supplied frombattery 20 in the camera body 11 through the VBATT and PGND terminals.The supply of electricity is controlled by the CPU 35 by means of theperipheral parts control circuit 23. In the drawings, reference numeral91 designates a clock generation circuit. The VBTT terminal is connectedboth with a motor drive IC 63 and port P12 of the lens CPU 61, which isfor monitoring the battery voltage, through a register R4.

Main operation of the lens CPU

The main operation of the lens CPU 61 will be explained below withreference to FIGS. 6 and 7. Instruction commands are shown in Tables 1and 2. Commands (data) utilized to transmit various camera body datafrom the camera body to the lens are shown in Table 3. Commands utilizedto transmit various lens data from the lens to the camera body are shownin Table 4. A memory map of RAM 61b of the lens CPU 61 is shown inTables 5 to 11.

In the main routine, the lens CPU 61 first sets a high-speed actuationmode (Step (hereinafter "S") 101). The lens CPU 61 performs aninhibition of interruption operation, sets a stack address, initializesport P, and then inputs the present absolute zoom code from the zoomcode plate 71 (S103-S109). Then, data that is calculated based on thezoom code is stored in the RAM 61b, and a group of data (LC0-LC15 inTable 5) stored in the RAM 61b, by means of communication (formercommunication) in accordance with a clock signal of the camera body 11,is transmitted to the camera body (S111). After completion ofcommunication, a 3-ms timer is started (S113).

When the former communication has been completed, a KAFEND signal ("L""level") will be outputted from the interface 62 before 3 ms has passed,in accordance with the 3 ms timer. However, if the former communicationcompletion signal (KAFEND signal) is not outputted before 3 ms haspassed, in accordance with the 3 ms timer, a stop operation (stopping ofclock 91) is performed to break the main routine (S115, S117, S119).When the KAFEND signal is outputted before 3 ms has passed, theoperation has been performed in a normal manner. Accordingly, a commandis received from the camera body 11 by means of communication. If thereceived command is not a new communication command, identifying thecamera as one which is suitable for a new communication, a stopoperation is performed to prevent a mis-communication with a camera bodywhich is unsuitable for the new communication (S121, S123, S119). The"new communication" is defined in this specification as a state in whicha bi-directional communication of commands and data is possible betweenthe camera body and photographing lens in synchronization with the clockof the photographing lens.

When the new communication command is received, a command receiptcompletion signal is outputted to the camera body, so as to start apermission of a 2 ms timer interruption, permit interruption of newcommunication, and permit other possible interruptions (S123, S125,S127, S128, S129). Accordingly, an interruption operation of the 2 mstimer and interruption of new communication is made possible. The aboveoperations are all initially performed when the main switch of thecamera body 11 is turned ON and electricity is supplied from the camerabody 11. While the main switch is ON, the following operations will berepeated.

A zoom code is inputted from the zoom code plate 71 (S131). If the zoomcode is different from the previous one, distance code data is inputtedand lens code data LC2, including the distance code data, is stored inRAM 61b (see FIG. 2). Then, an operation or calculation is performed onthe basis of the data of zoom code, so as to store the calculated datain the lens RAM 61b as LC0-17 and LB4, LBB data (S133, S135, S137). Ifthe zoom code is the same as the previous one, distance code data isinputted from the camera body 11 and lens code data (LC2), including thedistance code data, is stored in the lens RAM 61b at a predeterminedaddress (S133, S139, S141).

It is determined whether there was a stop demand during communicationinterruption from the camera body (i.e., whether flag F₋₋ STANDBY isset), or whether there was an electric demand during interruption of the2 ms timer (i.e., whether flag F₋₋ LBATREQ is set). When there is nostop demand, or when there is electric demand, a constant imagemagnification operation (ISZ) is performed, followed by a NIOSToperation (i.e., the process is returned to step S131 of the mainroutine so as to repeat the above operation). The above corresponds tosteps S143, S145 and S147. It is to be noted that "electricity demand"is a demand which asks the camera body 11 (body CPU) to supply thepowered zoom lens 51 with electricity from the battery 20 in order todrive the zoom motor 65 via electric source pins BPC and LPC.

When a stop demand exists and a battery or electricity demand does notexist, a stop operation is performed after making a preparation forstopping (i.e., preparation for inhibition of the 2 ms timerinterruption and cancellation of stop). The above corresponds to stepsS143, S145, S149 and S151. The lens CPU 61 stops the clock 91 to enterthe low power consumption mode (standby). The stopped state (low powerconsumption mode) can only be cancelled by, for example, a communicationinterruption from the camera body, and the process returns to the normaloperation (clock 91 operation). When returning to the normal operation,the process returns to step S153 after completion of the communicationinterruption routine. When the stop demand is cancelled or theelectricity demand is generated in the communication interruption, theprocess returns to S131 after permitting a 2 ms timer interruption andstarting the 2 ms timer. Otherwise, the process returns to step S149 toagain enter the stop condition or the power save mode (S153, S155,S157).

INTI Operation

A communication interruption operation, shown in FIG. 8, is performed bythe lens CPU 61 and will be explained below. An INTI operation is anoperation to conduct communication interruption in which an operation isperformed on the basis of the commands and data, etc. received duringcommunication. This operation commences when the interruption signaloutputted from interface 62 is inputted to port INT1 of the lens CPU 61.

When the process enters the communication interruption, thecommunication interruption is inhibited and a command is inputted fromthe camera body 11 after clearing the stop flag (F₋₋ STNDBY) and an NGflag (F₋₋ SCKNG, F₋₋ CMDNG) in steps S201, S203 and S205. The processchecks the upper 4 bits of the command as inputted and proceeds to anappropriate subroutine, depending on the upper bits (S207 and S229). Ineach of the subroutines, an appropriate operation is performed dependingon the lower bits. In the illustrated embodiment, subroutines makingidentification from the upper 4 bits include a BL command subroutine,instruction code subroutine, a 16-byte (first half 8-byte data/secondhalf 8-byte) data subroutine, byte by byte data subroutine, and a testmode subroutine (S209, S213, S217, S221, S225 and S229).

If the above 4 bits are not those set above, the process sets command NGflag F₋₋ CMNDNG and returns to the main routine after permittingcommunication interruption (S227, S231 and S233).

2 ms Timer Interruption Operation

The operation of the lens CPU 61 when receiving an interruption of the 2ms timer will be explained below with reference to a 2 ms timerinterruption flow chart, shown in FIG. 9. The 2 ms timer is a hard timerthat is incorporated in the lens CPU 61 for outputting interruptionsignals in each 2 ms. The 2 ms timer interruption is a periodic intervaloperation which conducts an interruption operation upon the passing ofthe 2 ms interval of the 2 ms timer, provided that interruption ispermitted.

In the 2 ms timer interruption operation, all other interruptions areinhibited. Then, a present value is inputted from the AF pulse counterto be stored in the lens RAM 61b, and present distance code data isinputted from the distance code plate 81 to be stored in RAM 61b (S303,S305). If desired, an AF pulse number is corrected, and the presentdistance code is stored in the lens RAM 61b as previous distance code,at a different address, for the next 2 ms timer interruption operation(S307, S309).

The present zoom code is read from the zoom code plate 71 and stored inthe lens RAM 61b as a present zoom code. The process inputs the state ofzoom mode changing switch 77 and the state of the zoom speed changingswitch 75 (S311, S313). The process proceeds to a DZ operation when thepowered zoom mode is selected, and to a MZ operation when the manualzoom mode is selected (S315).

Operation

The DZ operation and MZ operation shown in FIG. 10 are flowchartsregarding an electrically driven (powered) zoom operation and manual(hand operated) zoom operation, respectively. These operations areperformed by the lens CPU 61.

In the powered zoom (DZ) operation, an end point detection operation toidentify if the group of zooming lenses 53Z has reached the end pointthereof is performed (S351).

Flags for controlling the motor, etc. are set depending upon the zoommode changing switch 75 and control flags, such as flag F₋₋ MOVTRG, F₋₋MOV, etc. PZ pulse, and present value of the focal length are inputtedto be stored the in RAM 61b. If desired, the PZ pulse is corrected. Whenthe present position of the group of zooming lenses 53Z is unknown, aposition initializing operation (PZ-INITPOS) to the group of zoominglenses 53Z is performed, and the zoom code is stored at a differentaddress as a previous zoom code in preparation for the next 2 ms timerinterruption operation (S353, S355, S357).

If the constant image magnification zoom mode (F₋₋ ISM=1, i.e., ISZoperation) is selected, an ISZ memory operation is performed and thestate of zoom switch 75 and 77 is stored in preparation for the next 2ms timer interruption operation (S357-S361). According to the flag setin step S353, a drive control for the zoom motor 65, set-up ofinterruption bit-flag, duty ratio up operation for PWM control areperformed. If a PWM control is conducted, the PWM timer is started(S363). Then, the process permits interruption and returns to the stepconcerned (S395).

In the manual zoom (MZ) subroutine, the zoom motor 65 is first stopped,the LED of the PZ pulser 69 is turned off, battery request (electricitydemand) flag F-LBTREQ is cleared, and the bit of each of the PZ lensstate PZ₋₋ LST data is cleared (S371, S373, S375, S379).

Data regarding PZ control stored in lens RAM 61b at a given address iscleared, and zoom code is stored in preparation for the next 2 ms timerinterruption operation. The PZ pulse number, roughly detected from thezoom code, is stored in lens RAM 61b as the present value of PZ pulse(PZPX), and a start value of PZ pulse (PZPSTRT) and PZ pulse counter(PZPCNT) is cleared. The present value of the PZ pulse, as roughlydetected, is converted into a present focal length (rough data) to bestored in the memory (S383, S385, S387).

The state of zoom switches 75 and 77 is stored in preparation for thenext 2 ms timer interruption operation. Then, the 2 ms timer is startedto allow the 2 ms timer interruption and to inhibit an interruption ofINT3 (PZ pulse count) and INT 2 (PWM) in steps S389 through S393. Theprocess permits another interruption and returns to the step concerned(S395).

Method for Controlling PWM

PWM control method will be explained below on the basis of the flowchart shown in FIGS. 11 to 13. FIG. 11 shows the portion of the 2 mstimer interruption routine, shown in FIGS. 9 and 10, which relates toPWM control. FIG. 12 shows the portion of the PZ pulse countinterruption routine shown in FIGS. 95 and 96, which relates to a PWMcontrol. FIG. 13 show a PWM interruption routine (brake operation)during the PWM control. The relationship between the main flow of FIG. 6and various interruption routines will be explained hereinafter. It ispossible to interrupt, by one of the communication interruptions (2 mstimer interruption or PWM interruption), the loops of main flows stepsS127-S131 and S131-S157 shown in FIG. 6. It is also possible to effectthe interruption by one of the 2 ms timer interruption, PZ pulse countinterruption or PWM interruption in the communication interruptionroutine. In the PWM control, the speed is controlled by increasing ordecreasing a ratio (PWM duty ratio T₋₋ PWMBRK) between a period of timein which power is supplied and a period of time in which power is notsupplied. In other words, according to the illustrated embodiment, aconstant speed control is realized by increasing a PWM duty ratio (T₋₋PWMBRK) so as to a prolong power supply time to the zoom motor 65, whena PZ pulse is not detected within a predetermined period of time,thereby making the control speed higher, or by decreasing the PWM dutyratio (T₋₋ PWMBRK) so as to shorten the power supply time to the zoommotor 65 when the PZ pulse is detected within a predetermined period oftime, thereby making the control speed slower (see FIG. 14).

In the illustrated embodiment, upon starting (i.e., when the motor isbrought into actuation from its stopped state or braked state), the dutyratio is set at a minimum (i.e., a shortest power supply time), andthen, the zoom motor 65 is supplied with power to count pulses outputtedfrom the PZ pulser 69. When no pulses are outputted within apredetermined period of time, the duty ratio is gradually increased.When pulse is output within the predetermined period of time, the dutyratio is decreased. Thus, the zoom motor 65 is driven under anacceleration control or constant speed control, so that pulses areoutputted at a preset time, period or cycle. Also, by setting the dutyratio at the minimum when the motor is actuated, it enables thephotographer to effect a very smooth zooming operation.

The process first checks if the zoom motor 65 is to be actuated (if flagF₋₋ START is set in S401. If it is to be actuated, PWM timer T₋₋ PWM iscleared and the PWM duty ratio T₋₋ PWMBRK is set at the minimum value(lowest speed), so as to actuate the zoom motor at the lowest speed.Then, the process proceeds to step S405. If the motor is not to beactuated, the process proceeds to step S405 without performing anyoperations (S401, S403).

In step S405, a process set pulse duration (pulse period P₋₋ PWMPLS) inaccordance with the speed set by the zoom speed changing switch 75, etc.so as to supply electricity to the zoom motor 65 (S405, S407). Thismeans that the zooming speed is controlled so that the PZ pulse isoutputted at a pulse duration T₋₋ PWMPLS.

The process checks if the PWM drive mode or the DC drive mode is suitedto the zooming speed. If the PWM drive mode is selected, the processproceeds to step S411. If, however, the DC drive mode is selected, theprocess will be returned (S409). In step S411, one increment is added tothe PWM timer T₋₋ PWM. The process checks if such value, having beenincreased by one increment, exceeds the pulse period T₋₋ PWMPLS. Ifexceeded, the PWM duty ratio (T₋₋ PWMBRK) is increased, and if notexceeded, no operation is performed (S413, S415). That is, if the PZpulse is given within a predetermined period of time (T₋₋ PWMPLS), thePWM duty ratio (T₋₋ PWMBRK) is increased to prolong the power supplytime, thus prescribing a high speed operation to the preset speed.

The process will be completed after setting the PWM duty ratio (T₋₋PWMBRK), starting the PWM timer and permitting an interruption of the 2ms timer (S417, S419). It should be noted that steps S407-S419correspond to times (A), (C) and (D) in FIG. 14, respectively.

When a PA pulse is outputted from the PA pulser 69, the process enters aPZ pulse count interruption operation shown in FIG. 12. In the PZ pulsecount interruption operation, the pulse period (T₋₋ PWMPLS) is comparedwith PWM timer T₋₋ PWM. If the pulse period (T₋₋ PWMPLS) is larger thanthe PWM timer, a pulse is outputted within the pulse period T₋₋ PWMPLS.Thus, the PWM duty ratio T₋₋ PWMBRK is decreased and the PWM timer T₋₋PWM is cleared. If the pulse period T₋₋ PWMPLS is less than the PWMtimer, a pulse is outputted after one pulse period T₋₋ PWMPLS, so thatthe PWM timer T₋₋ PWM is cleared to complete the process at this time(S421, S423, S425).

In a PWM interruption routine shown in FIG. 13, the process inhibits aninterruption, and breaks the zoom motor 65 so as to inhibit theinterruption of INT2 (PWM), while allowing another interruption, and theprocess is returned. The operation in the above corresponds to time (B)in FIG. 14.

In the PWM control according to this embodiment, the pulse period T₋₋PWMPLS is set at three stages, i.e., a low speed of 8, medium speed of4, and a high speed of 3, depending upon the speed designated by thezoom speed changing switch 75 etc. The PWM timer T₋₋ PWM is cleared whenthe motor is actuated and when the process transfers to the PZ pulsecount interruption operation upon receipt of the PZ pulse outputted fromthe PZ pulser 69. Thereafter, the PWM timer is counted-up in the 2 mstimer interruption routine at S411, until after the PZ pulse isoutputted. Accordingly, the PWM timer T₋₋ PWM indicates a time which isa multiple of the time elapsed since the previous PZ pulse wasoutputted. It should be noted, however that the duration of the PZ pulseis greater than the period of 2 ms timer interruption, even in a highspeed mode.

For example, when the high speed of 3 is assigned (i.e., pulse durationT₋₋ PWMPXS=3, the time period that elapses since the previous PZ pulsewas outputted is 2 ms×3=6 ms. When the low speed of 8 is assigned, T₋₋PWMPLS will be 8. The operation during the low speed will be explainedwith reference to the flow charts illustrated in FIGS. 11 and 12. If, instep S413 of the 2 ms timer interruption, it is determined that thepulse period T₋₋ PWMPLS is smaller than the PWM timer T₋₋ PWM, i.e.,when it has been passed more than 2 ms×8=16 ms has passed since theprevious PZ pulse was outputted, the process proceeds to increase thePWM duty ratio (S415).

On the other hand, and in the PZ pulse count interruption operation, ifit is determined that the pulse period T₋₋ PWMPLS is larger than the PWMtimer T₋₋ PWM during the check in step S421, the PZ pulse is outputtedbefore 2 ms×8=16 ms has passed after the previous PZ pulse was output.Accordingly, the PWM duty ratio is decreased (S423).

As shown above, a constant speed control, in which the PZ pulse durationis kept constant is made possible, by increasing or decreasing dutyratio (T₋₋ PWMBRK) of PWM so that the PZ pulse is outputted at apredetermined pulse cycle or period (T₋₋ PWMPLS). The PZ pulse duration,and thus control speed, may be changed by changing the pulse period T₋₋PWMPLS to be set.

Constant Image Magnification Ratio Zooming

Constant image magnification zooming (IZS) will now be explained.Constant image magnification zooming is a control in which an imagemagnification ratio m represented by m=f/D may be kept constantregardless of a variation in an object distance, wherein the objectdistance and a focal length are represented by D and f, respectively.

First, the principle of constant image magnification zooming will beexplained. For clearer illustration, the zoom lens constituted by twolens groups of a first group and a second group will be used in theexplanation. Image magnification ratio m of the zoom lens is given byequation 1 below.

    m.sub.1 =x/f.sub.1

    m.sub.2 =f/f.sub.1

    m=m.sub.1 *m.sub.2 =x*f/f.sub.1.sup.2                      1

wherein;

m: image magnification ratio

m₁ (m1): magnification ratio of the first group

m₂ (m2): magnification ratio of the second group

f: composite focal length

f₁ (f1): focal length of first lens group

x: amount of advancement of the first lens group from ∞ end (amount ofdisplacement)

The amount of advancement upon setting an image magnification ratio x₀(x0), focal length f₀ (f0), and image magnification ration m₀ (m0) isgiven by:

    m.sub.0 =x.sub.0 *f.sub.0 /f.sub.1.sup.2                   2

If a focal length f which satisfies the following equation 3 is foundwhen the lens is displaced to x by means of a focusing operation, theimage magnification ratio can be maintained constant.

    m.sub.0 =x*f/f.sub.1.sup.2                                 3

From equations 2 and 3,

    x.sub.0 *f.sub.0 /f.sub.1.sup.2 =x*f/f.sub.1.sup.2,

Thus, the focal length f, which is to be found, is given as follows:

    f=x.sub.0 *f.sub.0 /x                                      4

If a defocus amount Δx at the lens advancement amount x is obtained bymeans of an AF macrometer, an objective focal length f can be calculatedby:

    f=x.sub.0 *f.sub.0 /(x+Δx)                           5

The principle (theory) of constant image magnification ratio zooming isexplained above. In a practical (applied) control, however, the amountof advancement of the lens is managed by the focal length code plate, AFpulser, etc. The AF pulser is designed so that it will have a linearrelationship with the amount of advancement of the lens.

Thus, the amount of advancement x, x₀ in equation 4 and 5 may bereplaced with an AF pulse number from the ∞ end and a defocus amountwith defocus pulse number.

An actual operational method in the illustrated embodiment will beexplained below. In this embodiment, the lens CPU 61 performs constantimage magnification ratio zooming (control zooming). The operation isperformed on the basis of an image magnification ratio supplied from thecamera body 11 or on the basis of object distance and focal length at agiven instance.

(1) When image magnification ratio m₀ is sent from the body:

(i) A provisional set value, pulse number for advancement x₀ and focallength f₀ is obtained from m₀.

First, let

    f.sub.0 =|f.sub.1 |                      6

Let amount of advancement corresponding to x₀ be X, and using equation(2);

    m.sub.0 =X*f.sub.0 /f.sub.1.sup.2                          7

Let AF pulse number per 1 mm of lens advancement amount be k;

    x.sub.0 =X*k                                               8

From equation 8, 6 and 7, objective advancement pulse number x₀ is givenas follow:

    x.sub.0 =m.sub.0 *|f.sub.1 |*k           8

(ii) Next, x₀ f₀ will be obtained;

From equations 6 and 9, x₀ *f₀ is obtained as follows:

    x.sub.0 f.sub.0 =x.sub.0 *f.sub.0                           ○10

(iii) Objective focal length f is obtained;

f is obtained on the basis of present position (present advancementpulse number) x as follows:

    f=x.sub.0 f.sub.0 /x                                        ○11

f is also obtained on the basis of defocal pulse number Δx as follows:

    f=x.sub.0 f.sub.0 /(x+Δx)                             ○12

(2) When f is to be obtained on the basis of an advancement pulse numberx₀ stored in the lens RAM 61b and focal length f₀ ;

(i) x₀ f₀ will be obtained the above x₀ and f₀, using equation ○ 10 asfollows:

    x.sub.0 f.sub.0 =x.sub.0 *f.sub.0

(ii) Magnification ratio m₀ will be obtained by using equations 7, 8 and○ 10 as follows:

    m.sub.0 =x.sub.0 f.sub.0 /(f12*k)                           ○13

(iii) Objective focal length f is obtained as follows: f will beobtained in the same way as above (iii) in (1).

(iiii) f₁ is data peculiar to the lens and is stored in ROM 61a.

ISZ Operation

A calculation operation regarding the constant image magnification ratiozooming (ISZ) of the embodiment based on the above described principlewill be explained in detail with reference to flow charts shown in FIGS.15 and 16. This operation, is performed by the lens CPU 61.

The image magnification ratio is set by the zoom speed changing switch75 or set-up switch (SL switch). This will be explained later in detailwith reference to FIG. 90.

The ISZ operation is related to a calculation of the preset imagemagnification ratio and to calculation of focal length for maintainingthe preset image magnification ratio. The focal length will becalculated in the case where focusing is required and the case wherefocusing is not required. In each case, the calculation is made by thephotographing lens or camera body. When focusing is required, the focallength, image magnification ratio and objective lens advancement amountare calculated on the basis of an amount of the advancement of lens uponfocusing. When focusing is not required, image the magnification ratioand objective lens advancement amount are calculated on the basis ofdefocus amount and present focal length.

The process first performs a communication interruption inhibition (SEI)and checks certain flags (F₋₋ STIS, F₋₋ ISZM, F₋₋ ISZFOM, F₋₋ ISZXOM) inorder to determine the way in which the ISZ operation is beingperformed, on the basis of communication information transferred fromthe camera body 11 (S451, S453, S465, S477, S479). These flags indicatethat communication regarding ISZ has been performed in relation to thecamera body 11. In each communication, the flag is set (stored) in RAM61b. The required operation or calculation will be made on the basis ofthe flags.

F₋₋ STIS is a flag to indicate that data transferred from the body is tobe used; F₋₋ ISZM is a flag to indicate that data from the photographinglens is to be used; F₋₋ ISZFOM is a flag to indicate that focal length fdata is to be used; and, F₋₋ ISZXOM is a flag to indicate that objectdistance x data from the body is to be used.

When the constant image magnification ratio zooming is performed on thebasis of the image magnification ratio sent from the camera body 11 (F₋₋STIS=1), communication interruption is permitted (CLI), x₀ ×f₀ isobtained from the above equations (6), (9) and (10) to be stored in RAM61b at a predetermined address, and an interruption is inhibited so asto clear flag F₋₋ STIS (S455-S463).

In the case where the image magnification ratio has been stored and aconstant image magnification ratio zooming is performed on the basis ofthe focal length and object distance stored in the memory (F₋₋ STIS=0,F₋₋ ISZM=1), interruption is permitted, x₀ ×f₀ is calculated from theabove object distance (advancement pulse number) x₀ and focal length f₀,the image magnification ratio m₀ is calculated using equation (13) so asto be stored in RAM 61b at a predetermined address, the communicationinterruption is inhibited, and flag F₋₋ ISZM is cleared (S465-S475).

In the case where constant image magnification ratio zooming isperformed on the basis of focal length f₀ sent from the camera body 11and object distance (advancement pulse number) x₀ (F₋₋ STIS=0, F₋₋ISZM=0 and ISZFOM=1, F₋₋ ISZXOM=1), x₀ f₀ is first calculated on thebasis of the focal length f₀ as received and object distance x₀ so as tobe stored in memory. Image magnification ratio m₀ is calculated fromequation (13). Interruption is inhibited and flags F₋₋ ISZFOM, F₋₋ISZXOM are cleared (S477-S489). In a case other than the above, it isnoted that no communication regarding operation is conducted in relationto the camera body 11. Accordingly, no operation is performed in such acase.

Then, flag F₋₋ PREOK is checked so as to determine if a predictor amountalready sent from the camera body is effective. If it is effective, flagF₋₋ FPRE is set-up. Otherwise, flag F₋₋ FPRE is not set-up (S491-S493).

Checking is done as to whether the mode is the ISZ zooming mode. If themode is the ISZ zooming mode, the current flag is checked if it is aflag (F₋₋ AFPOS=1) which recognizes the position of the present focusinglens 53F (object distance). If the position of the present focusing lensis known (F₋₋ AFPOS=1), the process proceeds to the FPRE-OP operation,in which control is performed using predictor amount, otherwise, theprocess passes through the ISZ operation (S495, S497).

If the mode is not the controlled zooming mode, flags F₋₋ FPREOK, F₋₋FPRE, F₋₋ ISOK are cleared. Then, the content at a predetermined address(LNS₋₋ INF1) and logical sum of each of the bits [00000111B] are storedat a predetermined address (LNS₋₋ INF1). Thereafter, the process passesthrough the ISZ operation (S495, S498, S499).

FPRE-OP Operation

The FPRE-OP operation shown in S501-S513, in which objective focallength f is obtained on the basis of a predictor amount, will beexplained with reference to the flow chart shown in FIG. 17. Thisprocess is performed by the lens CPU 61 when the predictor amount issent from the camera body 11 during a communication of the CPU with thecamera body 11 (during this communication, flag F₋₋ FPRE is stored(memorized) in RAM 61b), or when steps S453 S463, S465-S475 or S477-S489are performed to change or modify x₀ f₀ values by the communication ofthe CPU with the camera body 11 regarding ISZ and flag F₋₋ FPRE is setin S491 S493. Flag F₋₋ FPRE is a flag which determines whether thecalculation (f=x0f0/(x+Δx)) to obtain objective focal length f based ona predictor amount is performed.

When entering this operation, the process checks if flag F₋₋ FPRE is setso as to determine whether the operation based on predictor amount is tobe performed (S501). If flag F₋₋ FPRE is not set, the process jumps toS515. Otherwise, the process proceeds with the following operation.

First, F₋₋ FPRE is cleared and a communication interruption isinhibited. Objective focal length f is calculated from equation (12),utilizing predictor amount, and communication interruption is inhibited(S503-S509). Then, the objective focal length f is transformed to theobjective PZ pulse number from a WIDE end so as to be stored in RAM 61bat a predetermined address (PZPFPRE). Flag F₋₋ FPREOK, which indicatesthat the operation based on the predictor amount is effective, is set.Then, the process proceeds to step S515 (S511, S513).

S515-S521 are steps in which the objective focal length f is calculatedon the basis of present AF pulse (advancement pulse number).

In S515, permission of interruption (CLI) is performed. The objectivefocal length f is calculated using equation (11) so as to be stored inRAM 61b at a predetermined address (ISZ₋₋ FL,H) and then inhibition ofinterruption (SEI) is performed (S515, S517). The objective focal lengthf calculated in the above is transformed into an objective PZ pulse fromthe WIDE end. The transformed pulse value is stored in RAM 61b at apredetermined address (PZPF) in S519, S521.

The content of bits 3 through 7 of LNS₋₋ INF1, calculated in S529, willbe explained below. LNS₋₋ INF1 is information which is periodically sentfrom the lens to the camera body by means of communication. Bits 3through 7 are information regarding ISZ mode.

Bits 6 and 7 are flags which indicate whether an objective PZ pulse(PZPFPRE or PZPF) obtained by the ISZ operation is positioned on theWIDE side or TELE side with respect to the present PZ pulse. If theobjective PZ pulse is positioned on the WIDE side, bit 7 is set, and ifit is positioned on the TELE side, bit 6 is set. If the objective PZpulse is between the WIDE side and TELE side, neither bit 6 nor 7 isset.

Bits 3 through 5 indicate, by 1/8 segments, an approximate value whichis the difference between the objective PZ pulse number and pulse numberof the present position, i.e., PZ pulse number required for the lens tomove from the present position to the objective position, divided by thetotal PZ Pulse number (i.e., PZ Pulse number required for the lens tomove from the WIDE end to the TELE end). Bits 3, 4 and 5 are weighted by1/8, 1/4 and 1/2, respectively. The above value will be zero when thepresent position is equal to the objective position. Thus, bits 3through 5 are all cleared. If the present position is at the WIDE endand the objective position is at the TELE end, or vice versa, the valuewill be 7/8 and therefore bits 3 through 5 are all set at "1".

Thus, the camera body 11 receives, in LSN₋₋ INF1, periodically or uponrequest for information from the photographing lens 51, so that thecamera body is able to send appropriate ISZ control information to thephotographing lens 51.

The process checks if the operation based on predictor amount iseffective (F₋₋ REOK=1. If effective, objective PZ pulse number(PZPFPRE), obtained by using predictor amount, is stored in accumulator(ACC). If not effective, objective PZ pulse number (PZPF) obtained onthe basis of present AF pulse number is stored in the accumulator (S523,S525, S527).

Then, the values of bits 3 through 7 in LNS₋₋ INF1 are calculated on thebasis of the objective PZ pulse number stored in the accumulator. Thecalculated values are stored in RAM 61b at a predetermined address(i.e., bits 3 through 7 of LNS₋₋ INF1) and an interruption inhibitionoperation (SEI) is performed (S529, S531).

The following operation is performed, provided that constant imagemagnification ratio zooming is selected, that position (focal length) ofthe present group of zooming lenses 53Z is obtained (flag F₋₋ PZPOS=1),and that constant image magnification ratio zooming is being performed(flag F₋₋ ISOK=1). If any one of the above conditions is not satisfied,the process jumps to step S551 (S533-S537).

If the operation of objective focal length based on the predictor amount(PZ pulse number) is effective (flag F₋₋ FPREOK=1), and control flag forISZ is set up (flag F₋₋ ISZD=1), the PZ pulse number obtained by usingpredictor amount (from equation (11)) is stored in RAM 61b at apredetermined address (PZPTRGT) as objective pulse number (S539, S541,S543). If, however, the operation of the objective focal length based onthe predictor amount is not effective (F₋₋ FPREOK=) or ISZ control flagis cleared, the PZ pulse number obtained on the basis of AF pulse of thepresent position (advancement pulse number) using equation (12) isstored in the above predetermined address (PZPTRGT) in S539, S541 andS545. Flag F₋₋ ISZD is data which is sent from the body 11 by means ofcommunication and stored in RAM 61b. If F₋₋ ISZD=1, ISZ control isperformed on the basis of the calculated value based on the predictoramount. If F₋₋ ISZD=0, ISZ control is performed on the basis of thecalculated value based on the present position of AF pulse.

Zoom speed data (bit 6, 7 of BD₋₋ ST1) sent from the camera body 11 andstored in RAM 61b is stored in RAM 61b at a predetermined address (bit2, 3 of SPDDRC2). Constant image magnification ratio zooming flag F₋₋ISZ is set up and interruption is permitted. Then, the operation isreturned (S547, S549, S551). Constant image magnification ratio flag F₋₋ISZ indicates that the CPU 61 has completed calculating the distance ofthe target focusing point, and that preparations for the motor and thezoom lens to be driven have been made. When the constant imagemagnification ratio flag F₋₋ ISZ has been set, a constant imagemagnification ratio zooming operation is performed in the 2 msinterruption routine. The values of PZPTRGT, SPDDRC2 are also used inthe 2 ms timer interruption routine.

Instruction Operation

An instruction operation to be performed in the photographing lens 51when instruction codes (command) are received from the camera body 11will be explained below with reference to flow charts shown in FIGS. 19to 26, together with Tables 1 and 2 indicating the content ofinstruction codes. The instruction codes are details of S217 incommunication interruption routine of FIG. 8. Each instruction operationis performed depending upon the lower bits of the command.

A STANDBY command is a command to cause the lens CPU 61 to be broughtinto a sleep mode. A flow chart regarding an operation upon input of theSTANDBY command is shown in FIG. 19.

The lens CPU 61, upon receipt of STANDBY COMMAND, sets up flag F₋₋STNDBY, transmits a command receipt completion command to the body 11,allows communication interruption and is returned (S601, S602, S603).Lens CPU 61 checks flag F₋₋ STNDBY in the main routine at step S143. Inflag F₋₋ STNDBY is set up, lens CPU stops clock 91 and is transferredinto a low power consumption mode (standby mode)(See FIG. 7).

An AF-INTPOS command is a command which is sent after the camera body 11has displaced the focusing lens 53F to ∞ end by means of AF motor 39.This command is an initializing operation command for AF to clear an AFpulse counter of the photographing lens 51. A flow chart regarding anoperation performed by lens CPU 61, when the AF-INSTPOS command isinputted is shown in FIG. 20.

Lens CPU 61, when AF-INITPOS command is inputted, inputs distance codedata from distant code plate 81 (S611). If the code data corresponds tothe ∞ end (far end), AF pulse present position data (AFPXL, H) in RAM61b and F pulse start position data (AFPSTRTL, H) are cleared. A flag toidentify that the present position of focusing lens 53F is known F₋₋FPOS is set up and the process proceeds to S615. If the code data doesnot correspond to the ∞ end, the process skips through the above stepand proceeds to S615. The process outputs command receipt completioncommand to body 11, allows communication interruption and is returned(S615, S616).

A PZ-INITPOS command is a command which causes the lens CPU 61 toperform an initialization operation so as to identify the zoomingposition. In this embodiment, the PZ pulse number corresponding to thecode of the zoom code plate 71 is set in the PZ pulse counter when thezoom motor 65 is actuated, to detect boundary 72 of the code of zoomcode plate 71. A flow chart regarding an operation, performed when thePZ-INITPOS command is inputted is shown in FIG. 21. The operations, suchas the counting of PZ pulse, will be explained later in POS-NG OPERATIONshown in FIG. 86.

Lens CPU 61, when PZ-INTPOS code is input, clears flag F₋₋ PZPOS, setsup flags F₋₋ LBATREQ, F₋₋ IPZB and F₋₋ MOV, stores a predetermined data(lowest speed, direction TELE) in lens RAM 61b at SPDDRC1, and setsPZPA2B of the PZ pulse counter to zero. The PZ pulse counter counting PZpulse from the present position to the code boundary (S621- S624). Theprocess outputs a command receipt completion signal, allowscommunication interruption and is returned (S625-S626). The initializingoperation regarding power zooming (PZ) is performed on the basis of theabove set value during the 2 ms timer interruption operation.

A RETRACT-PZ is a command which effects power zooming of thephotographing lens 51 to minimize the length of (i.e., retract) thephotographing lens barrel, when, for example, the main switch of thecamera body is turned OFF. A flow chart regarding an operation uponinput of the RETRACT-PZ command is shown in FIG. 22.

Lens CPU 61, upon receipt of the RETRACT-PZ command, stores presentfocal length data in RAM 61b at a predetermined address (RETPOS L,H),set PZ pulse data by which length of lens barrel becomes minimum (datainherent to the lens) in RAM 61b at a predetermined address, and setpredetermined data (maximum speed) in SPDDRC2(S631, S632, S632-2). TheLens CPU also sets each flag F₋₋ LBATREQ, F₋₋ IPZB and flag F₋₋ MOVTRG,sends a command receipt completion signal, and permits communicationinterruption. The process is then returned (S634-S636).

The focal length data before retraction (accommodation) is sent to thecamera body 11 by means of a separate communication command (FOCALLEN-X,which will be explained hereinafter). Flag F₋₋ BATREQ is a flag whichasks for electric supply to the power zoom lens 51 for the power zoomingoperation thereof, flag F₋₋ IPZB is a flag which indicate that zoomingcontrol (ISZ, PZ-INITPOS, etc.) is being conducted in the lens, and flagF₋₋ MOVTRG is a flag which moves zooming lens 53Z to an objective pulseposition stored in address PZPTRG in the 2 ms timer interruptionoperation. Accommodation operation regarding the zooming lens 53Z isperformed in the 2 ms timer interruption routine on the basis of theabove set value.

RET-PZPOS is a command which returns the zooming lens from its retractedstate to the state before it is retracted. In other words, it is acommand to return the zooming lens 53Z to its state before retraction oraccommodation, for instance, when the main switch of the camera bodySWMAIN is turned ON (to the position of focal length before retractpower zooming is performed). A flow chart showing an operation uponinput of the RET-PZPOS command is shown in FIG. 23.

When the lens CPU 61 receives the RET-PZPOS command, the lens CPU 61sets the focal length data, which is one of the data items stored in theaddress, before retraction, designated by the code of the command andwhich is sent immediately before retract power zooming, at apredetermined address (FCLL, H) of the lens RAM 61b (S641). It should benoted that, focal length data stored before retraction sent from camerabody 51 by means of separate communication command is stored in theaddress RETPOSL,H.

The above focal length data is converted into an objective pulse numberand stored in RAM 61b at a predetermined address as objective pulsenumber PZPTRG. A predetermined PZ speed data (high speed) is stored inSPDDRC2. Flags F₋₋ BATREQ, F₋₋ IPZB, F₋₋ MOVTRG are set. Command receiptcompletion signal is transmitted and communication interruption ispermitted. The process is then returned (S642-S646). It is noted thatthe return operation is also performed in the 2 ms timer interruptionoperation.

IPZ-STOP is a command which stops the power zooming operation. Thiscommand is a command which stops controlled power zooming such as ISZ(constant image magnification), PZ-INITPOS (return), RETRACT-PZ(retraction or accommodation). It is not a command to stop a manualpower zooming. A flow chart regarding an operation upon input of theIPZ-STOP command is shown in FIG. 24.

Lens CPU 61, when the IPZ-STOP command has been inputted, clears flagF₋₋ ISOK, together with flags F₋₋ MOVTRG, F₋₋ MOV, F₋₋ ISZ) regardingperformance of power zooming operation (S651, S652). Lens CPU 61 outputscommand receipt completion signal and permits communication interruptionand the process is then returned (S653, S654). Since the above flags arecleared, controlled power zooming such as ISZ (i.e., other than manualpower zooming) is not performed in the 2 ms timer interruptionoperation.

ISZ-MEMORY is a command which stores present values of AF pulse andfocal length in order to perform constant image magnification zooming. Aflow chart regarding an operation upon input of ISZ-MEMORY command isshown in FIG. 25.

When an ISZ-MEMORY command is inputted, lens CPU 61 stores present value(AFPXL,H) of AF pulse counter in ISZAF pulse memory (ISZ₋₋ AFPL,H) inlens RAM 61b at a predetermined address. Lens CPU stores present value(FCLXL,H) of focal length in the ISZ focal length memory (ISZ₋₋ FCLL,H)(in lens RAM 61b at a predetermined address) in steps S661, S662. FlagF₋₋ ISZM is set, the command receipt completion command is outputted,and communication interruption is permitted. The process is thenreturned (S663-S665). On the basis of the above values, operation of ISZindicated by S465-S475 in FIG. 15 is performed.

ISZ-START is a command which starts constant image magnificationzooming. A flow chart regarding an operation upon input of the ISZ-STARTcommand is shown in FIG. 26.

When the ISZ-START command is inputted, lens CPU 61 sets flags F₋₋LBATREQ, F₋₋ IPZB, F₋₋ ISOK and outputs a data transmission completionsignal. Communication interruption is permitted and the process isreturned (S671-S673). On the basis of the above values, the 2 ms timerinterruption operation and operations at and after S537 in FIG. 18 willbe performed.

Command Subroutine

Operation in photographing lens 51 upon receipt of BL command fromcamera body 11 will be explained with reference to FIGS. 27 to 37. TheBL command communication operation is similar to that performed in theinstruction command subroutine, except that the command receiptcompletion signal is first outputted, then data is inputted, and theinputted completion signal is outputted. BL command is a detail of S213in the communication interruption subroutine of FIG. 8. Each commandoperation is performed depending upon the content of lower bits of thecommand.

PZ-BSTATE (20) is a command which sends necessary data to IPZ (constantimage magnification ratio zooming). The data sent by this commandincludes data which indicates the status of focusing lens 53F, i.e.,whether the lens is at the far end (infinite end) (F₋₋ ENDF=1) or thenear end (closest end (F₋₋ ENDN=1), in far move (F₋₋ FARM=1) or nearmove (F₋₋ NEARM=1), whether the lens is in overlap integration (F₋₋OVAF=1), whether it is in a moving object prediction mode (F₋₋ MOBJ=1),whether it is in a focusing state (F₋₋ AFIF=1), whether an imagemagnification ratio should be stored by means of command (communication)from the body or by means of judgement of the lens CPU 61 (F₋₋ ISM=1),etc. A flow chart regarding an operation upon receipt of the PZ-BSTATEcommand is shown in FIG. 27.

When the PZ-BSTATE command is inputted, lens CPU 61 sends commandreceipt completion signal, inputs PZ-BSTATE data of 1 byte from camerabody 11, and performs subroutine CNTAFP regarding an AF pulse countoperation (S701-S703). Detail of the CNTAFP subroutine is shown in FIGS.39 to 43, which will be explained hereinafter.

Data input completion signal is outputted and communication interruptionis permitted. Then, the process is returned (S704, S705). The cameraaccording to this embodiment has an AF drive source mounted to the body11. Accordingly, when the AF pulse is counted in lens 51, drivingdirection information of AF, etc. is always sent from body 11 to lens 51by means of this command, before actuating AF and after changing drivingdirection.

BODY-STATE0 is a command which informs the photographing lens of dataregarding the state or condition of the body. This command is sentduring periodical communication between the photographing lens andcamera body. A flow chart regarding an operation upon receipt of theBODY-STATE0 command is shown in FIG. 28.

When the BODY-STATE0 command is inputted, lens CPU 61 sends a commandreceipt completion signal, and inputs data (BODY-STATE0) of 1 byteregarding the status of the body 11 from the body so as to store thedata in lens RAM 61 at BD₋₋ ST0 (S711-S713). When the upper 5 bits ofthe above 1 byte data are masked and stored in lens RAM 61b at ZM₋₋MODE, a data input completion signal is outputted and communicationinterruption is permitted. The process is then returned (S714-S716).

In the lower 3 bits, BODY-STATE0 data includes information regardingpower zooming mode of the camera body 11, such as, constant imagemagnification ratio (ISZ), during-exposure (EXZ), manual power zooming(MPZ), etc. BODY-STATE0 data includes, in the upper 5 bits, informationregarding the ON/OFF status of an electric source of the body circuitsystem (F₋₋ VDD=1), the ON/OFF status of the photometric switch (F₋₋SWS=0), supply of electricity from the body 11 to the zoom motor (F₋₋BATT=1), AF/MF changing switch of the body 11 being AF or MF (F₋₋ SWAF),and the mode of AF being single or continuous (F₋₋ MAF).

BODY-STATE1 is a command which sends data regarding the status of thecamera body 11, similar to those in BODY-STATE0 command. This commandincludes information regarding the status of sequence of operations ofthe camera body 11. A flow chart regarding an operation upon receipt ofBODY-STATE1 command is shown in FIG. 29.

Upon receipt of the BODY-STATE1 command, the lens CPU 61 sends a commandreceipt completion signal and inputs data (BODY-STATE1) of 1 byte fromthe body 11 so as to store them in lens RAM 61b at BD₋₋ ST1 (S721-S723).If flag F₋₋ IPZD is set, flags F₋₋ ISOK, together with flags F₋₋ MOVTRG,F₋₋ MOV, F₋₋ ISZ of address BD₋₋ ST1 is cleared. If flag F₋₋ IPZD is notset, the above operation is not performed (S724, S725, S726). A datainput completion signal is outputted, and then communicationinterruption is permitted. Finally, the process is returned (S724, S727,S728).

The operation to be performed when flag F₋₋ IPZD is set is an operationsimilar to the IPZ-STOP command of instruction code 35. This commandcauses the lens CPU 61 to receive information regarding the body and toperform the IPZ-STOP command. Flags relating to the command will beexplained below.

F₋₋ IPZD is a flag which identifies whether an operation similar toIPZ-STOP is to be performed.

F₋₋ MPZD is a flag which identifies whether manual power zooming is tobe inhibited. When F₋₋ MPZD is set, manual power zooming is inhibited.Flag F₋₋ MPZD is referred to during the 2 ms timer interruptionoperation.

F₋₋ ISZD is a flag which identifies whether ISZ is to be controlled onthe basis of the AF pulse number of the present position (duringfocusing) or on the basis of the focal length obtained from thepredictor amount. This flag is referred to during a subroutine of ISZ(S541 in FIG. 18).

F₋₋ ISSPA and F₋₋ ISSPB are flags which identify the control speed ofISZ and are referred to in S547 in FIG. 18.

A flow chart regarding an operation upon receipt of SET-AFPOINT commandis shown in FIG. 30.

Lens CPU 61 inputs SET-AFPOINT command (23), outputs a command receiptcompletion signal, receives SET-AFPOINT data of 1 byte from the bodyside, so as to set them in lens RAM 61b at a predetermined address,outputs a data input completion signal and permits a communicationinterruption. The process is then returned (S731-S735).

The SET-AFPOINT command is performed before communication of LB commandand LENS-AFPULSE (15).

A LENS-AFPULSE command determines which AFPULSE is to be sent from lens51 to body 11, depending upon information sent by SET-AFPOINT command.

When bit3 (X) is set, AF pulse (AFPULSE (AFPXL,H)) of the presentposition is sent.

When bit7 (ISZM) is set, AF pulse number (AFPUSE (ISZ₋₋ AFPL,H)),obtained when the image magnification ratio is stored during ISZ mode,is sent. It is to be noted that it is impossible for bit3 and bit7 to beset at the same time.

When neither bit3 nor bit7 is set, bits 4 through 6 (FM0, FM1, FM2)become effective.

8 segments (0-7) for memorizing AF pulse data are provided in the lensRAM 61b of lens CPU 61 (AFPOL,H- AFP7L,H). AF pulse data may be storedin respective segments by means of a command from the body 11. Threebits of bit 4 through 6 designate addresses 0 to 7. AF pulse datamemorized in such addresses will be transmitted. This command onlyserves to designate one of the AF pulse data to be sent to the body 11in LENS-AFPULSE (15).

A flow chart regarding an operation upon receipt of SET-PZPOINT commandis shown in FIG. 31.

When SET-PZPOINT command (24) is inputted, lens the CPU 61 outputs acommand receipt completion signal, receives SET-PZPOINT data from thebody side and sets the same in the lens RAM 61b at a predeterminedaddress, outputs a data input completion signal, and permitscommunication interruption. The process is then returned (S741-S745).

The SET-AFPOINT command is performed before communication of the LBcommand and FOCALLEN-X(16).

The LENS-AFPULSE command determines, on the basis of information sent bythe SET-PZPOINT command, whether the focal length data of the presentposition or the focal length obtained when the image magnification ratiois memorized during the ISZ mode is to be sent to the body 11.

When bit3 (X) is set, focal length data (FCLXL,H) of the presentposition is sent.

When bit7 (ISZM) is set, focal length (focal length (ISZ₋₋ FCLL,H) ofISZ memory) obtained when the image magnification ratio is stored duringthe ISZ mode is sent. It is to be noted that it is impossible for bit3and bit7 to be set at the same time.

When neither bit3 nor bit7 is set, bits 4 through 6 (FM0, FM1, FM2)become effective.

8 segments (0-7) for memorizing the focal length are provided in thelens RAM 61b (FCL0L,H-FCL7L,H). The focal length may be stored inrespective segments by means of the SET-PZPOINT command from the body11. Three bits of bit 4 through 6 designate addresses 0 to 7. The focallengths memorized in such addresses will be transmitted. This commandonly serves to designate one of the focal lengths to be sent to the body11 in FOCALLEN-X (16).

STORE is a command which sets predetermined AF pulse data at adesignated address. A flow chart regarding an operation upon receipt ofthe STORE-AFP command is shown in FIG. 32.

Lens CPU 61, upon receipt of the STORE-AFP command (25), outputs acommand receipt completion signal and inputs data of 2 bytes from thecamera body 11 (S751, S752). If one of the bits is not ISZ memory(ISZM=0), the input data is stored in lens RAM 61b at address(AFP0L,H-AFP7L,H), designated by AM0-AM 2 of the data. If one of thebits is stored in ISZ memory (ISZM=1), the input data is stored in theISZ memory (ISZ-AFPL,H) of lens RAM 61b (S751-S756). ISZ operationalflag F₋₋ ISZXOM is set. A data input completion signal is outputted, andcommunication interruption is permitted. The process is then returned(S757-S758).

STORE-DEFP&D (26) is a command which causes the lens RAM 61b to store adefocus amount and defocal pulse regarding the camera body 11. A flowchart regarding an operation upon receipt of the STORE-DEFP&D command isshown in FIG. 33.

Lens CPU 61, upon receipt of the STORE-DEFP&D command, outputs a commandinput completion signal, and inputs defocus pulse data of 2 bytes anddefocus amount data of 2 bytes from the camera body 11. The inputteddefocus pulse is multiplied by 1/2 (S761-S764). In the illustratedembodiment, since the ratio of body AF pulse to lens AF pulse is 2:1,the input defocus pulse is multiplied by 1/2. The ratio may be set asdesired.

If flag F₋₋ SIGN has been cleared, the defocus pulse number is added tothe present AF pulse number so as to store the added value in ISZ₋₋ FPX.If flag F₋₋ SIGN has not been cleared, the defocus pulse number issubtracted from the present AF pulse number and the subtracted value isstored in ISZ₋₋ FPX. When flag F₋₋ SIGN=1, the defocus amount is towardsthe FAR end, and when F₋₋ SIGN=0, the defocus amount is towards the NEARend. Then, flag F₋₋ FPRE is set, a data input completion signal isoutputted, and communication interruption is permitted. The process isthen returned (S765-S771). Defocus pulse transmitted by means ofcommunication as described above is used in the ISZ operation routine soas to obtain objective focal length by utilizing defocus pulse. Flag F₋₋FREE is a flag which gives an indication to perform an operation using apredictor amount.

STORE-PZP (27) is a command which causes present AF position (positionof focusing lens or focusing object distance) and present position of PZ(position of group of zooming lenses 53Z or focal length) to be storedin a designated memory (address).

STORE-PZF is a command which causes the focal length designated bycamera body 11 to be stored at a predetermined address.

A flow chart regarding an operation upon receipt of the STORE-PZPcommand is shown in FIG. 34.

Lens CPU 61, upon receipt of the STORE-PZP command, outputs a commandreceipt completion signal and inputs data of 1 byte from the camera body11 (S781, S782). If the PZ memory is designated (when the PZM flag isset), focal length data of the present position is stored in the address(FCL0L,H-FCL7L,H designated by FM0-FM2, otherwise the focal length datais not stored (S783, S784).

If AF memory is designated (when AFM flag is set), an AF pulse number ofthe present position is stored in the address (AFP0L,H-AFP7L,H)designated by AM0-AM2. Otherwise, a data input completion signal issimply outputted, while permitting communication interruption. Theprocess is then returned (S785-S788).

A flow chart regarding an operation upon receipt of STORE-PZF command isshown in FIG. 35.

Lens CPU 61, upon receipt of a STORE-PZF command, inputs data of 2 bytesfrom the camera body. If this command is not ISZ memory (if flag F₋₋ISZM is not set), the inputted data of 2 bytes are stored in lens RAM61b at address (FCL0L,H-FCL7L,H) designated by bits FM0 FM2. If thecommand is ISZ memory (if ISZM is set), the inputted data is stored inISZ memory and a flag F₋₋ ISZFOM, which performs an operation on thebasis of a focal length, is set up (S791-S796). A data input completionsignal is outputted and communication interruption is permitted. Theprocess is then returned (S797-S798).

STORE-IS (29) is a command which causes the image magnification ratiomemory (address ISZ-IMGL,H of lens RAM 61b) to store an imagemagnification ratio. A flow chart regarding an operation upon receipt ofthe STORE-IS command is shown in FIG. 36.

Lens CPU 61, upon receipt of the STORE-IS command, outputs a commandreceipt completion signal, inputs data of 2 bytes regarding an imagemagnification ratio from the camera body 11, stores the data in an imagemagnification ratio memory (ISZ-IMGL,H), and sets flag F₋₋ STIS(S801-S804). The data input completion signal is outputted andcommunication interruption is permitted. The process is then returned(S805-S806). Flag F₋₋ STIS is a flag which performs an operation ofimage magnification constant zooming in accordance with the imagemagnification ratio sent from the camera body.

MOVE-PZMD (2A) is a command which causes a power zooming in thedesignated direction or towards a focal length in the designated memory(address in lens RAM 61b ).

MOVE-PZF₋₋ (2B) is a command which performs power zooming to adesignated focal length, for example, to a focal length calculated inthe camera body 11. The data of this command includes data regardingfocal length and zooming speed.

A flow chart regarding an operation upon receipt of the MOVE-PZMDcommand is shown in FIG. 37.

Lens CPU 61, when the MOVE-PZMD command is inputted, outputs a commandinput completion signal, and inputs data of 1 byte from camera body 11(S811-S812). If flag F₋₋ MDM is set in the input data, data is read outfrom the address (FCL0L,H-FCL7L,H) designated by MVM0-MVM2. The read outdata is converted into PZ pulse data and stored in lens RAM 61b atPZPTRGT. Driving speed data (F₋₋ SPA, F₋₋ SPB of bits 6 and 7) is storedin SPDDRC2, and flag F₋₋ MOVTRG is set to 1. If flag F₋₋ MDM is not set,the upper 4 bits of the input data are stored in address SPDDRC1 andflag F₋₋ MOV is set (S813-S819). These data are referred to in the 2 mstimer interruption routine so as to perform power zooming in adesignated manner.

When flags F₋₋ LBATREQ and F₋₋ IPZB are set, a data input completionsignal is outputted and communication interruption is permitted. Theprocess is then returned (S820-S820-2). If flag F₋₋ MDM (bit3) is set,the command is to perform power zooming towards the focal length storedin the designated memory. If flag F₋₋ MDM is not set, the command is toperform power zooming in a direction designated by flag F₋₋ MDT and F₋₋MDW (bits 4 and 5). Flag F₋₋ MDT designates driving in the TELEdirection, flag F₋₋ MDW designates driving in the WIDE direction, andflags F₋₋ SPA and F₋₋ SPB (bits 6 and 7) designate zooming speed.

A flow chart regarding an operation upon receipt of a MOVE-PZF commandis shown in FIG. 38.

When the MOVE-PZf command is inputted, the lens CPU 61 outputs a commandreceipt completion signal, inputs focal length data of 2 bytes fromcamera body 11, converts input focal length data into PZ pulse data soas to store the same in the lens RAM 61b at address PZPTRGT, sets speeddata in SPDDRC2, and sets flags F₋₋ BATREQ, F₋₋ IPZB, F₋₋ MOVTRG. Thesedata are referred to in the 2 ms timer interruption routine so as toperform power zooming in a designated manner. A data input completionsignal is outputted and communication interruption is permitted. Theprocess is then returned (S821-S827).

CNTAF Operation

An AF pulse count operation in the photographing lens 51 will beexplained below with reference to the flow charts shown in FIGS. 39 to43. This count operation is a detail of an operation executed in S703 bymeans of the PZ-BSTATE command (20) shown in FIG. 27. In the illustratedembodiment, the value of the AF pulse counter is cleared (set to zero)when the focusing lens 53F reaches the FAR end (infinite photographingposition). On the other hand, a maximum value is set at the AF pulsecounter when the focusing lens reaches the NEAR end (closestphotographing position). In the case of a NEAR MOVE (driven towardclosest distance), the AF pulse outputted from the AF pulser 59 is addedthereto. In the case of FAR MOVE (driven toward infinite), the AF pulseis subtracted therefrom.

Interruption is inhibited, data inputted during communication is storedat address PZ₋₋ BDST, and the present distance code is inputted from thedistance code plate 81 (S901 S905).

If flag F₋₋ ENDF to identify a FAR END (infinite position) is set, it isdetermined if the inputted distance code is a code of the FAR END(S907-S909). If the distance code is the FAR END, the present AF pulsevalue and AF pulse count start value (address AFPZL,H, AFPSTRTL,H) arecleared and flag F₋₋ AFPOS is set up to indicate that the AF pulse ofthe present position is known (S909, S913, S915). If flag F₋₋ NEARM toidentify NEAR MOVE is cleared, the process jumps to CNTAFP10 operation.If an F₋₋ NEARM flag is set, the process jumps to a CNTAFP11 operation,since the driving direction is to be changed (S917). If the detecteddistance code is not the FAR END code, far end flag F₋₋ ENDF₋₋ iscleared and the process jumps to a CNTAFP3 operation (S909 and S911).

If the far end flag F₋₋ ENDF is cleared, the near end flag F₋₋ ENDN,which identifies the near end (closest focusing position) is checked. Ifthe near end flag is cleared, the process proceeds to CNTAFP3 (S919).

If the near end flag F₋₋ ENDN is set, the process checks if the distancecode is a near end code. If it is not a near end code, the far end flagF₋₋ ENDN is cleared and the process proceeds to a CNTAFP3 operation(S919-S923). If the distance code is the near end, the AF pulse countvalue and AF pulse count star value are set at a maximum (set N₋₋AFMAXL,H at AFPXL,H, AFPSTRTL,H), flag F₋₋ AFPOS which identifies thatthe present AF pulse is known, is set. The process checks if the presentstatus is a FAR MOVE (F₋₋ FARM=1). If it is a FAR MOVE, the processproceeds to a CNTAFP11 operation, otherwise the process proceeds to aCNTAFP10 operation (S925=S929).

As described above, in the case of the FAR END (F₋₋ ENDF=1) or NEAR END(F₋₋ ENDN=1), the count value of the AF pulse is corrected by thecorresponding predetermined value. If the input distance code isdetermined to be at neither of ends, the above end point correction isnot performed.

An operation (CNTAFP3 operation) when the group of focusing lenses 53Fis positioned between the FAR END and NEAR END will be explained withreference to a flow chart shown in FIG. 40.

First, a counter value, in a hard counter of the present AF pulse, isset in an AF pulse counter (AFPCNTL,H) in steps S931, S933. If flag F₋₋FARM is cleared, the process proceeds to a CNTAFP6 operation. If F₋₋FARM flag is set, it is checked if the previous status was NEAR MOVE(i.e., if flag F₋₋ NEARM0 is set) in steps S933, S935. If it isdetermined that the status has been changed from NEAR MOVE to FAR MOVE,an AF pulse count start value (AFPCNTL,H) is added to an AF pulsecounter start value (AFPSTRL,H) so as to store it in theAFPXL,H&AFPSTRTL,H memory for present AF pulse value and AF pulse countstart value. The process proceeds to a CNTAFP12 operation (S935, S937).

If the previous status was not a NEAR MOVE, it is determined if theprevious status was a FAR MOVE. If it is not the FAR MOVE, i.e., thelens was not moved, the process proceeds to CNTAFP11. If the previousstatus was also a FAR MOVE, a count value (AFPCNTL,H) is subtracted fromthe AF pulse count start value (AFPSTRL,H) so as to store the differencein the present AF pulse value (AFPXL,H), since there is no change indriving direction. Then, the process proceeds to a CNTAFP6 operation(S939, S941).

The CNTAFP6 operation, when the present status is not a FAR MOVE, willbe explained below with reference to the flow chart shown in FIG. 41. Itis noted that the CNTAFP6 operation is the first operation that theprocess enters after start-up.

The process checks if the status is NEAR MOVE. If it is not NEAR MOVE,the process proceeds to a CNTAFP8 operation (S951). If it is NEAR MOVE,the process checks if the previous status was NEAR MOVE. If previousstatus was also NEAR MOVE, an AF pulse count value (AFPCNTL,H) is addedto the AF pulse count start value (AFPSTRTL,H) so as to store the sum inpresent AF pulse value (AFPXL,H) in steps S953, S955.

If the previous status was not NEAR MOVE, but rather FAR MOVE, it is anindication that the driving direction is to be changed. Accordingly, AFPcount value (AFPCNTL,H) is subtracted from the AF pulse count startvalue (AFPSTRTL,H) so as to store the difference in the AF pulse valueand AF pulse count start value (AFPXL,H&AFPSTRTL,H) in steps S958, S959.If the status is not FAR MOVE, the process proceeds to a CNTAFP11operation (S957).

An operation effective upon stopping of the AF motor (CNTAFP8 OPERATION)will be explained below with reference to a flow chart shown in FIG. 42.

In the CNTAFP8 operation, the process first checks if the previousstatus was NEAR MOVE (S961).

If the previous status was NEAR MOVE, this means that the lens wasstopped during NEAR MOVE. Accordingly, an AF pulse count value(AFPCNTL,H) is added to the AF pulse count start value (AFPSTRTL,H) andthe sum is stored in the AF pulse value and AF pulse count start value(AFPXL,H & AFPSTRTL,H). The process then proceeds to a CNTAFP10operation (S961, S963).

If the previous status was FAR MOVE, this means that the lens wasstopped during FAR MOVE. Accordingly, an AF pulse count value(AFPCNTL,H) is subtracted from the AF pulse count start value(AFPSTRTL,H) so as to store the difference in present AF pulse value andAF pulse count start value (AFPXL,H & AFPSTRTL,H). The process thenproceeds to a CNTAFP10 operation (S961, S965, S967).

If the previous status was not NEAR MOVE nor FAR MOVE, this means thatthe lens has been stopped. Accordingly, the process proceeds to aCNTAFP16 operation (S961, S965).

CNTAFP10, 11, 12, 16 operations will be explained below with referenceto the flow chart shown in FIG. 43. The process enters CNTAFP10 justafter the AF motor 39 has stopped. Accordingly, the LED of the AF pulser59 is turned OFF, the content of PZ₋₋ BDST is stored in PZ₋₋ BDSTO, andcommunication interruption is permitted. The process then passes throughthe AF pulse count operation (S971, S977, S979).

The process enters a CNTAFP11 operation upon the start of AF driving.Accordingly, the LED of AF pulser 59 is turned ON, an AF pulse hardcounter and AF pulse count value memory (AFPCNTL,H) is cleared, thecontents of PZ₋₋ BDST memory is transferred to PZ₋₋ BDSTO, andcommunication interruption is permitted. The process then passes throughan AF pulse count operation (S973, S975, S977, S979).

The process enters a CNTAFP12 operation when driving direction ischanged during the actuation of AF. Accordingly, the AF pulse hardcounter and AF pulse count value (AFPCNTL,H) are cleared, the content ofPZ₋₋ BDST memory is transferred to PZ₋₋ BDST0, and communicationinterruption is permitted. The process then passes through an AF pulsecount operation (S975, S977, S979).

The process enters a CNTAFP16 operation or processing during movement inthe direction of a NEAR MOVE or FAR MOVE (S655, S641), or when the AFmotor is stopping (S965). Accordingly, the contents of PZ₋₋ BDST istransferred to PZ₋₋ BDSTO and communication interruption is permitted.The process then passes through the AF pulse count operation (S977,S979).

LB Command Operation

A operation regarding a command which has the power zoom lens 51 sendthe information of the lens, i.e., state of the lens, to the camerabody, in accordance with the demand of the camera body, will beexplained below with reference to table 4 and the flow charts shown inFIGS. 44 to 51. The content of the command is shown in Table 4. The flowcharts shown in FIGS. 44 to 51 are details of an operation of S209 in acommunication interruption routine shown in FIG. 8. An operation will beperformed in accordance with the lower bits of the command.

PZ-LSTATE Operation

The flow chart shown in FIG. 44 illustrates PZ-LSTATE (10), by whichdata regarding power zooming control of the power zoom lens 51 is sentto camera body 11. Lens CPU 61, upon receipt of a command requiring alens state regarding power zooming (PZ-LSTATE), outputs a commandreceipt completion signal and thereafter outputs data regarding the typeof power zooming control, (for example, a constant image magnificationratio zooming control) to the camera body 11 (S1001, S1002). A datainput completion signal is outputted and communication interruption ispermitted. The process is then returned (S1003, S1004).

Flags used in this operation will be explained below.

Flag F₋₋ TMOV (bit 0) is set when the zoom motor is moving in the TELEdirection.

Flag F₋₋ WMOV (bit 1) is set when the zoom motor is moving in the WIDEdirection.

Flag F₋₋ TEND is set when the group of zooming lenses 53Z is positionedat the TELE end.

Flag F₋₋ WEND is set when the group of zooming lenses 53Z is positionedat the WIDE end.

Flag F₋₋ IPZB is set when power zooming (initializing operation for ISZ,PZ, and retracting operation) is performed in a mode other than themanual power zooming.

Flag F₋₋ IPZI is set when manual power zooming is performed during ISZoperation.

Flag F₋₋ ISOK is set during lSZ operation.

Flag F₋₋ MPZI is set while manual power zooming is being performed.

POFF-STATE, POFFS-WSLEEP Operation

FIG. 45 illustrates a flow chart regarding a POFF-STATE (11) operationand POFFS-WSLEEP (12) operation. These operations serve to send to thebody 11 information regarding power zooming of the lens, battery requestinformation, monitor information of the electric source (battery) forPz, etc. The difference between POFF-STATE (11) and POFFS-WSLEEP (12)resides in whether the lens CPU 61 enters a lower power consumption modeafter completion of this command communication. When the POFFS-WSLEEP(12) operation is performed, flag F₋₋ STNDBY is set during thecommunication and lens CPU 61 proceeds to a low power consumption modewhen returned to the main routine. That is to say, POFFS-WSLEEP (12)command is a command which performs both the POFF-STATE (11) and STANDBYcommand (30) of the instruction code.

In the case of the POFFS-WSLEEP (12) command, the lens CPU 61 sets flagF₋₋ STNDBY, outputs command receipt completion signal, and inputs thecondition of switches (75, 77). If flag F₋₋ STNDBY is set (in a case ofPOFFS-WSLEEP (12)), electrically driven/manual changing switch (D/Mswitch) is assigned to an electrically driven mode. At this time, if theTELE or WIDE switch (speed changing switch) is turned ON, the processsets the battery request flag F₋₋ BATREQ and proceeds to S1025.Otherwise, the process proceeds to S1025 (S1017, S1019, S1021, S1023).

If the flag F₋₋ STNDBY is set, the process normally completes thiscommunication interruption and proceeds to a low power consumption modeafter it is returned to the main routine. If, however, flag F₋₋ BATREQis set, the process does not proceed to a low power consumption mode sothat the manual power zooming operation is possible, even though flagF₋₋ STNDBY is set to perform the normal operation, (see FIG. 7).

When flag F₋₋ STNDBY is not set, the process will not proceed to a lowpower consumption mode, even though it returns to the main routine.Accordingly, operations such as a manual power zooming will be possibleeven if flag F₋₋ BATREQ is not set in this command, provided that PZspeed switch 75 is turned ON.

The process will proceed directly to S1025 if flag F₋₋ STNDBY is cleared(when POFF-STATE(11)).

In S1025, flags F₋₋ SLSW, F₋₋ ASSW, F₋₋ PZM, F₋₋ PZD, F₋₋ AFSW are setor cleared, depending upon the data of the zoom mode changing switch 77.The state of the VBATT terminal is monitored and if electric power forPZ is not supplied from the camera body 11, flag F₋₋ BDET is cleared(VBATT OFF). Otherwise flag F₋₋ BDET is set (VBATT ON) in stepsS1027-S1031. The data (POFF-ST) of 1 byte, as set above, is transmittedto camera body 11, a data input completion signal is outputted andcommunication interruption is permitted. The process is then returned(S1033-S1037)

When a POFF-STATE operation is performed, the process jumps to stepS1013 while passing through flag F₋₋ STNDBY set operation in step S1011.Thereafter, operations similar to those of the POSFFS-WSLEEP operationwill be performed.

LENS-INF1 Operation

A flow chart of LENS-INF1 shown in FIG. 46 illustrates an operation bywhich various information of lens 51 is sent to camera body 11.

Upon an input of a LENS-INF1 data request command, sends lens CPU 61 acommand receipt completion signal, clears 2 bits of LNS₋₋ INF1 data of 1byte relating to the direction of power zooming, sets 1 bit to identifyAE auto-lens, and inputs switch information of zooming direction(S1041-S1043). In response to the switch information that is inputted,the corresponding bit is set so as to send 1 byte lens data to camerabody 11 (S1044, S1045). A data transmission completion signal isoutputted, and communication interruption is permitted. The process isthen returned (S1046 and S1047). It is to be noted that LNS₋₋ INF1 dataincludes data relating to constant image magnification ratio zooming.The detail of which is described above.

LENS-INF2 Operation

The flow chart of LENS-INF2, shown in FIG. 47, performs an operation bywhich fixed data inherent to lens 51 is sent to camera body 11.

Upon an input of a LENS-INF2 command, lens CPU 61 outputs a command lensCPU 61 receipt completion signal, outputs LNS-INF2 data to camera body11, outputs a data input completion signal, and permits a communicationinterruption. The process is then returned (S1051-S1054). LENS-INF2 dataincludes data to identify lens type, and PZ lens and the data is fixeddata stored in ROM 61a.

LENS-AFPULSE Operation

A flow chart of a LENS-AFPULSE shown in FIG. 48 is for an operation bywhich lens AF pulse count data is outputted to camera body 11.

As explained above, the SET-AFPOINT command communication is alwaysperformed prior to communication of the LENS-AFPULS command. The contentof the SET-AFPOINT command determines the AF pulse which is to be sentto the body by means of LENS-AFPULSE command.

Upon an input of the LENS-AFPULSE command, lens CPU 61 outputs a commandreceipt completion signal, and, if a present AF pulse is required,stores the present AF pulse number (AFPXL,H) in a register(S1061-S1063). When a pulse of constant image magnification ratiozooming (ISZ9) is demanded, AF pulse data (ISZ-AFPL,H) of ISZ is storedin the register (S1062, S1064, S1065). In a case other than the abovetwo cases, AF pulse data (AFP0L,H-AFP7L,H) of designated address isstored in the register (S1062, S1064, S1066). Thereafter, AF pulse data,set in the register, is outputted to camera body 11, a data transmissioncompletion signal is outputted, and a communication interruption ispermitted. The process is then returned (S1067-S1069).

FOCALLEN-X Operation

A FOCALLEN-X operation by which focal length data of lens 51 isoutputted to camera body 11 will be explained below with reference to aflow chart illustrated in FIG. 49.

As explained above, a SET-PZPOINT command communication is alwaysperformed prior to a FOCALLEN-X command communication. A SET-PZPOINTcommand, lens CPU 61 determines a focal length which is to be sent tothe body upon receipt of the FOCALLEN-X command.

Lens CPU 61, upon receipt of the FOCALLEN-X command, outputs a commandreceipt completion signal, and stores the present focal length (FCLXL,H)in the register, if present focal length is required (S1071-S1073). Whena focal length (ISZ-FCLL,H) for constant image magnification ratiozooming (ISZ) is required, a focal length (ISZ-FCLL,H) for constantimage magnification ratio zooming is stored in the register (S1072,S1074, S1075). In a case other than the above two cases, a focal length(FCL0L,H-FCL7L,H) of designated address is stored in the register(S1072, S1074, S1076). The focal length data set in the register isoutputted to camera body 11, a data transmission completion signal isoutputted, and a communication interruption is permitted. The process isthen returned (S1077-S1079).

IMAGE-LSIZE Operation

A flow chart of an IMAGE-LSIZE shown in FIG. 50 is for an operation bywhich an image magnification ratio data for performing a constant imagemagnification ratio zooming, stored in lens RAM 61b at a predeterminedaddress, is sent to camera body 11.

Lens CPU 61, upon input of IMAGE-LSIZE command, outputs a commandreceipt completion signal to camera body 11, outputs data (ISZ-IMGL,H)relating to image magnification ratio (image size) to camera body 11,outputs a data transmission completion signal, and permits communicationinterruption. The process is then returned (S1081-S1085).

BYTE DATA Processing

A 16 byte data flow chart shown in FIG. 51 is for an operation by whichbasic lens data of 16 bytes are all sent to camera body 11. It is to benoted that this command is a detail of the operation performed in thecommunication interruption routine of FIG. 8 at S221. Depending upon thelower bits of the command, each command will be performed. Processing ofthe first half 8 bytes and second half 8 bytes are similar to that ofthe 16 byte data communication and hence a detailed explanation isomitted.

Upon an input of a 6 byte command, lens CPU 61 outputs a command receiptcompletion signal to camera body 11, outputs a predetermined data(LC0-LC15) of 16 bytes to camera body 11, outputs a data transmissioncompletion signal and permits communication interruption. The process isthen returned (S1091-S1094).

PZ Operation for Body

An operation relating to a power zooming at the side of camera body 11will be explained below with reference to a flow chart shown in FIGS. 52to 55. This operation or processing is performed by the main CPU 35 onthe basis of a program stored in ROM 35a of the main (body) CPU 35 ofthe camera body 11.

The process first enters the operation of the main flow, when main CPU35 is reset, such as when the main switch is turned ON (when the batteryis inserted and electricity is generated). The process, when enteringthis operation, initializes RAM 35b, port setting, etc., inputspredetermined information by means of switch input or E2PROM DATA INPUT,and performs a power zoom initializing operation (PZINIT subroutine)(S1101, S1103, S1105). In this embodiment, a power zoom initializationis an operation by which initialization is done to the PZ lens andfocusing lens, for the purpose of detecting positions of the zoominglens and focusing lens. The above steps are done upon initial input ofpower source (i.e., when a main switch which is not shown is turned ON).While electricity is supplied, the following steps (from S1107) will berepeated.

In S1107, predetermined information is inputted. If locked (i.e., when amain switch is turned ON), photographing operation is possible. Hence,the process proceeds with the necessary operations. If the lock isreleased (i.e., when the main switch is turned OFF), the processproceeds to a lock operation at and after S1181 (S1109).

When the lock is released for the first time, or if the process isperformed for the first time after the photographing lens is mounted,flag F₋₋ NEWCOM (a flag which is set up when new communication isperformed relative to the photographing lens after completion of oldcommunication) is cleared, and a PZ initializing flag F₋₋ PZINIT iscleared so as to perform initialization of power zooming (S1109-S1115,S1121, S1123).

In the case that the lock is not initially released or the process doesnot perform an operation for the first time after the photographing lensis mounted, but the status is a first AF mode or first PZ mode, flag F₋₋PZINIT is cleared in order to initialize various operations and datarelating to AF, PZ, the flag being set when such data are initializedetc. The process then calls a PZINIT subroutine (S1111, S1113,S1117-S1123).

The process inputs switch information and performs an operation (PZLOOPsubroutine) relating to power zooming and gives the necessary indicationon the display panel. The process then proceeds to S1133 (S1127-S1131).

If the photometric switch SWS is turned OFF during the checking of thephotometric switch SWS at S1133, power supply Vdd of E2PROM and theperipheral parts control circuit is partly turned off (S1133, S1135). Ifflag F₋₋ AF, indicating that AF is being performed, is cleared, theprocess is returned to START, otherwise the process proceeds to stepS1165 (S1136).

If flag F₋₋ AF is set, it is likely that AF processing and constantimage magnification ratio zooming relating thereto have already beenperformed before photometric switch SWS is turned OFF. Accordingly, aconstant image magnification ratio zooming stop flag F₋₋ ISZSTOP is set,and an operation to stop the constant image magnification ratio zoomingand to check whether the same has been stopped (IPZENDCHECK subroutine)is performed (S1136, S1165, S1167).

The process then clears focusing flag F₋₋ INFOCUS, performs an AF motorstopping operation, sends driving information of AF, etc. to powerzooming lens 51 by means of PZ-BSTATE command communication, clears flagF₋₋ AF, and proceeds to step S1176 (S1169, S1171, S1173, S1175).

If the photometric switch SWS is turned ON upon the checking operationat step S1133, terminal Vdd is turned ON (constant voltage is supplied),photometry and operations relating to the exposure are performed, andthe results are displayed (S1137, S1138). If the status is not AF mode,the process jumps to an operation starting from step S1165 (S1139,S1165).

During the AF mode, flag F₋₋ AF is set, a photometric operation orintegrating operation is started, and the integrated data is taken intothe process so as to perform predetermined predictor operation (S1139,S1140, S1143).

If the results obtained from the predictor operation are effective, theprocess checks if focusing is required. If focusing is required, afocusing operation or processing is performed (S1145, S1149, S1151).When focusing is not required, and in the case of the non-power zoomingmode (F₋₋ PZ=0), the process jumps to S1176. In the case of the powerzooming mode, the process sends driving information of AF, etc. to thepower zooming lens 51 by means of a PZ-BSTATE command, and actuates theAF motor 39. The process then proceeds to the moving object operation orprocessing starting from step S1159 (S1145. S1149, S1153-S1157).

When the result of calculated predictor is not within an effectiverange, for example, if the contrast of the object is too low, theprocess performs a search operation to obtain an effective value, andthen proceeds to step S1153 (S1145, S1147). The search operation is toobtain effective defocus amount by means of an integrating operation bydriving AF motor 39 in the direction of the closest end or infinite end.

When the focusing operation at step S1157 or AF motor actuation at stepS1157 has been completed, and if the object is a moving body, theprocess performs a moving object follow-up AF operation (S1159). If thestatus is in the constant image magnification ratio zooming mode, theprocess performs a constant image magnification ratio zooming operationand then proceeds to release switch SWR check operation at S1176(S1159-S1163).

At step S1176, the process checks if the release switch SWR has beenturned ON. If the release switch is turned OFF, the process isimmediately returned to START. If the release switch is turned ON, theprocess is returned to START after performing a releasing operation,provided that release is permitted (S1176, S1178, S1179).

If the lock is effected (i.e., the main switch is turned OFF) uponchecking at S1109, the process proceeds to S1181. If the lock iseffected for the first time in this routine and if in the power zoomingmode, the process proceeds to a withdrawal operation (S1184-S1209) inorder to withdraw the focal length data stored in preset zoom set modeto the camera body. Otherwise, the process jumps to step S1223 (S1181,S1183).

If the lock is not effected for the first time, or if the photographinglens is not a power zoom lens, the process shuts OFF constant voltagesupply (CONT) and power supply (VBATT) to the photographing lens, andclears the indication on display 45. The process is then returned toSTART (S1181, S1183, S1223-S1227).

In the withdrawal operation, the address of the memory (RAM 61b) to bewithdrawn is designated by means of a SET-PZPOINT command in order towithdraw the focal length stored in lens RAM 61b to the body. Then, thefocal length data stored in the address designated by the FOCALLEN-Xcommand is inputted from lens 51, so as to store them in body RAM 35b ataddress FLM as focal length data (S1184, S1185, S1187). IMAG-LSIZE dataincluding image magnification ratio is inputted from lens RAM 65b so asto store the image magnification ratio data in body RAM 35b at addressISM, an LENS-INF2 data is inputted from RAM 65b. The process thenproceeds to step S1195 (S1181-S1193).

In this embodiment, the image magnification ratio data is transferred tothe camera body in order to simplify the process of communication in theretracting operation. However, it may also be possible that both thefocal length data, which is obtained when an image magnification ratiois set, and the amount of lens movement data, regarding lens retraction,are transferred.

At steps S1195 and S1197, the process checks whether accommodation of apower zoom is possible or power zoom is to be effected based on the datainput by LENS-INF2. If it is impossible to accommodate a power zoom orpower zoom is not to be effected, the process immediately proceeds toCONT1. If power zoom accommodation is possible and power zoom is to beeffected (repPZ=1, PZD=1), the body side requests BBATreq to check thebattery. When the battery is normal, a command (RETRACT-PZ) to causepower zoom lens 51 to perform a power zoom accommodation operation issent, a flag F₋₋ IPZON to identify that controlled zooming is beingperformed is set, and an NG timer is started. The process then proceedsto a CONT1 operation (S1195-S1209).

If the battery is found to be abnormal during battery checking, theprocess proceeds to the CONT1 operation (S1203). It should be noted thatflag retPZ relates to information inherent to the lenses. This flag willbe cleared when the zooming lens is, for example, an inner zooming lensand hence the lens does not require accommodation or retracting thereof,so that an accommodation or retracing operation is not performed.

In the CONT1 operation, it is checked, based on the AF retraction flagRETAF inputted by the LENS-INF2, whether the power zoom lens 51 isAF-retractable or in an AF mode. If the lens is AF-retractable and inthe AF mode, the focusing lens 53F is returned to a retracted positionby driving an AF motor 39 (S1211-S1215). Then, if controlled powerzooming is being effected, a standby is continued until power zoominghas ended, while checking the operation of the controlled power zoom.When power zooming ends, constant voltage supply and power to the cameralens are turned OFF and the display 45 is also turned OFF, resulting ina return to the start (S1217-S1227). If the lens is not AF-retractableor not in the AF mode, the lens retraction operation is skipped. Here,the flag RETAF is information inherent in the lens and is cleared whenthe zoom lens is an inner focusing type and a retraction of the focusinglens is not necessitated, as a result of which no processing for theretraction is performed.

PZ, AF-INIT Operation

Hereinafter, the initialization operation of the power zoom lens 51 tobe controlled on the side of the body 11 will be described withreference to a PZINIT subroutine shown in FIGS. 56 to 58.

In this operation, the power zoom lens 51 initializes both the zoominglens group 53Z and the focusing lens group 53F and returns theinformation, sheltered by turning off the main switch in the body, tothe lens 51. In detail, the former is an operation which detects thepositions of the zooming lens and the AF lens, while the latter is anoperation for again returning to the lens 51 (the lens RAM 65b) an imagesize of ISZ and a focal length for a preset zoom, which are sheltered inthe body RAM 35b when the main switch is turned OFF (or locked).

If this processing is initiated for the first time, a new communicationflag NEWCOM indicative of the end of the old communication is clearedand thus the old communication is performed to communicate with the lensROM in synchronization with the clock of the camera body 11. After that,the old communication is switched to the new communication whichcommunicates with the lens CPU 61 in synchronization with the clock ofthe lens CPU 61 (S1301, S1303).

If an attached camera lens is not a Kz lens (including the power zoomlens 51 according to the present embodiment) having the lens CPU, thenew communication is impossible so that the flow is returned. On thecontrary, if the lens is the Kz lens, an input of data from the cameralens is effected by the new communication LENS-INF2 (14) and it ischecked whether the attached lens is the power zoom lens (PZ lens)(S1305, S1309). If it is not the PZ lens, flag F₋₋ PZ, identifying thePZ lens is cleared, and, the flow advances to step S1323 (S1309, S1311).

If the attached lens is the PZ lens, flag F₋₋ PZ is set. When a reset iseffected in the camera body 11 (or when the battery is exchanged) orwhen the lens is first attached to the camera body 11, an initial valueis stored in an image size memory (ISM) (S1313, S1315, S1319). In theother cases, information regarding the focal length for a preset zoomingoperation and the like, sheltered in the body RAM 35b, is stored througha STORE-PZF (28) communication at a predetermined address (FCLOL, H toFCL7L, H) of the lens RAM 61b for the lens CPU 61. Then, a STORE-IS (29)communication is performed so that the image size, sheltered in the RAM(35b) of the body CPU or the image size of the initial value set at stepS1319, is stored at predetermined addresses (ISZ-IMGL, H) of the RAM(61b) for the lens CPU, and a new communication flag is set (S1321,S1323).

Next, the data is inputted through a POFF-STATE (11) communication fromthe lens CPU 61, and then the flow is sent to step S1361 where a standbyoperation is performed if flag F₋₋ PZINIT, which indicates thatinitialization of the power zoom has been completed, is set or if theflag F₋₋ PZ has been cleared (S1325 to S1329).

If flag PZINIT is cleared and flag F₋₋ PZ is set, and when power zoomingis not performed (i.e., when flag F₋₋ PZD (bit 5 of POFF-STATE data) iscleared), that is, when manual zooming is performed, the flow advancesto an AF initialization (AFINIT) operation (S1325 to S1331). When thepower zoom mode is used, flag F₋₋ BBATREQ, requesting power supply forPZ, is set and the power zoom lens 51 is supplied with power by means ofthe BATONOFF subroutine. Further, it is checked whether or not the poweris supplied thereto in a normal manner (S1131 to S1137). If the powerfrom the battery is not outputted to the power zoom lens 51 in a normalmanner thereto (i.e., flag F₋₋ BATNG=1), the flow advances to the AFINIToperation. On the contrary, if power supply is normal (the flag F₋₋BATNG=0), a PZ-INITPOS command (32) is outputted to force the cameralens to initialize PZ. Further, the flow advances to the AFINIToperation after setting up the flag F₋₋ IPZON, indicating thatinitialization of PZ has been completed.

AFINIT Operation

A flowchart for an AFINIT operation, as shown in FIGS. 57 and 58, is anoperation for initialization of the AF. Further, in the presentembodiment, the AF is initialized after initialization of PZ. However,the AF may be initialized before initialization of PZ.

In the AFINIT operation, under the condition that the camera lens is inthe AF mode, a focusing lens 53F is moved to the retracted position, atwhich point the tube length is minimized (S1341, S1343). Specifically,the position is the far (i.e., infinity) position according to thepresent embodiment. The initialization data is then inputted by anAFINITPOS communication and flag F₋₋ AFINIT is set (S1345, S1347). Also,upon initialization, the lens CPU 61 generally initializes the lensRAM61b for AF-pulse counting.

Next, if a flag F₋₋ IPZON, indicative of power zooming other than manualpower zooming being effected, is set, it is checked in an IPZENDCHECKsubroutine whether the initialization of power zooming is ended (S1349to S1353). When the initialization of power zooming has ended, a flagF₋₋ PZINIT, identifying the end of power zooming initialization, is setwhile a battery request flag F₋₋ BBATREQ at the body side is set to "0".Further, in a BATONOFF subroutine, it is requested to stop the powersupply and it is checked if the stop has been completed (S1355 toS1359).

Then, if the power supply for a photometric IC17, CCD21 and E² PROM43and the like of the body 11 are turned on (Vdd ON), the flow isreturned. However, if they are turned OFF, a STANDBY command iseffected, and the flow is returned after the lens CPU 61 of the cameralens 51 is set in a standby state (a transfer to a low power consumptionmode) (S1361, S1363).

BATONOFF Operation

A BATONOFF flowchart, shown in FIG. 59, illustrates a checking operationperformed by a main CPU 35, wherein it is determined whether power for azoom motor 65 is normally supplied from the camera body 11 to the powerzoom lens 51 upon issuance of a power request (or a battery request)from the body or the lens. In the present embodiment, such a batteryrequest may be issued by either of the camera body 11 itself or thecamera lens 51.

In the BATONOFF operation, first of all, if the battery request is notissued from either of the power zoom lens 51 or the camera body 11, theflow is returned when power supply to the VBATT terminal has beenalready stopped (i.e., when flag F₋₋ BATON has been cleared (S1401,S1403, S1405)). However, when the power supply is effected the powersupply to the power zoom lens 51 is turned OFF flag F₋₋ BATON iscleared, a BODY-STATE0 output command is issued so as to sendinformation indicative of the power supply being turned OFF (BATT of bit5 is cleared) to the lens. Thereafter the flow is returned (S1421 toS1425).

When the battery request is issued from the power zoom lens 51 or thecamera body 11 (i.e., when a LBATREQ or BBATREQ of bit 1 of thePOFF-STATE data is set) and if the power is not yet being supplied, thepower zoom lens 51 starts to be supplied with power and BODY- STATE0data, concerning the body state, transmits information indicative of thepower supply being supplied (i.e., a BBAT of bit 5 is set) to the lens.After the flag F₋₋ BATON, identifying the power supply underway, is set,POFF-STATE data is inputted. However, if the power supply is alreadyturned ON, the flow goes directly to step S1415 where POFF-STATE data isinputted (S1407 to S1415).

If the battery supply is normal (i.e., flag F₋₋ BDET=1 in bit0 ofPOFF-STATE), the flow is returned (S1417). However, if the batterysupply is abnormal, for example, in the case of a short circuit, flagF₋₋ BATNG identifying the battery abnormality is set, power supply tothe power zoom lens 51 is cutoff, and flag F₋₋ BATON is cleared.Further, a BODY-STATE0 command is issued to send to the lens informationregarding the "ON" state of the power supply and then the flow isreturned (S1419 to S1425).

PZ-LOOP Operation

A PZ-LOOP operation, as shown in FIGS. 60A, 60B and 61, is an operationof power zooming which is intermittently performed by the main CPU 35.In this operation, a plurality of tasks, such as power zoom relations,preset zooming, by which power zooming is adjusted to a preset focallength, and presetting of the focal length and image size constant zoomcontrol are processed. In the present embodiment, the current focallength is stored when an SL switch is turned ON (a PZ mode switch 77)during a preset zoom set (PSZS) mode while power zooming is adjusted tothe preset length when the SL switch is turned ON during a preset zoom(PSZ) mode. Then, an image size, at the time when the SL switch isturned OFF, or when a zoom operation ring is returned to the neutralposition (i.e., when a PZ speed switch 75 is turned off), is stored.Upon initiation of this operation, the flow advances to S1505 at whichpoint the respective tasks are processed under the condition that thenew communication and power zooming are enabled, but the flow isdirectly returned if the new communication is impossible. Also, when thenew communication is possible, but power zooming is impossible, aBODY-STATE0 communication is effected (S1501, S1503, S1504-1). With thisBODY-STATE0 communication, the body-side information, such as a modeinformation of the power zoom, is sent to the lens, but an input of theinformation of the lens, such as the state of the switch of the lens, isperformed by the POFF-STATE communication when the Vdd is turned on(S1504-2, S1504-3). When the Vdd is turned OFF, an input of the lensinformation is performed by the POFFS-WSLEEP communication and the lensCPU 61 is transferred to the standby mode (the low power consumptionmode) (S1504-2, S1504-4). Due to the POFFS-WSLEEP command, the lens CPU61 maintains low power consumption until the next communication commandis received.

At S1505, various data, such as lens switches from the power zoom lens51, are inputted in the POFF-STATE. Further, depending on the data, aswitching of the PZ mode and a display correction are effected and thepower supply is performed or stopped (S1503 to S1509). Then, based onthe inputted data, the following operations are performed (S1509 toS1511).

If the current mode is the preset zoom (PSZ) mode, the actuation ofconstant image size zooming is inhibited (flag F₋₋ ISZSTOP is set) andconstant image size zooming is completed in an IPZENDCHECK subroutine(S1513 to S1517). Unless a preset zooming actuation (or drive) isinitiated (the SL switch is turned ON), the flow is returned (S1519). Ifthe preset zooming actuation is initiated and continues (F₋₋ IPZON=1), achecking operation which determines if the preset zoom has ended isperformed in the IPZENDCHECK subroutine. When it has ended, the flow isreturned (S1519, S1521, S1555).

Unless preset zooming is being actuated, the camera body 11 itselfrequests the power supply, and the power supply is performed (S1521 toS1525). Then, if the battery is abnormal, the flow is directly returned.On the other hand, if the battery is normal, power zooming is adjustedto a focal length position which is stored at an address designated by atransmission of a MOVE-PZND command, and the flow is returned followedby setting of a flag F₋₋ IPZON, which identifies the continuation ofpreset zooming (S1527 to S1531).

If the current mode is the preset zoom set (PSZS) mode, a flag (F₋₋ISZSTOP, F₋₋ IPZSTOP) by which preset zooming and constant image sizezooming drive are stopped, is set and in the IPZENDCHECK subroutine,preset zooming or the constant image size zooming drive is stopped(S1513, S1541, S1543, S1545).

Then, when the SL switch is turned ON, in order to store the currentfocal length in a designated address of the lens RAM 61b by the lens CPU61, a STORE-PZP command is transmitted to the power zoom lens 51, thepreset zoom set (PSZS) mode is changed to the preset zoom (PSZ) mode,whereas the values of bit 2-0 in the BODY-STATE0 command are changed,and the power zoom lens 51 is notified of changes, such as a renewal ofthe preset zoom mode by an output of the BODY-STATE0 data. Thereafterthe flow is returned (S1547 to S1553). If the SL switch SW remains OFF,the flow is returned without any processing (S1547).

When the current mode is the constant image size zooming mode, presetzooming is stopped and it is checked if a preset zooming has ended(S1541, S1561, S1563, S1565).

Here, when the SL switch is being depressed, a flag F₋₋ PZWAIT, whichinhibits initiation of constant image size zooming, is set and the flowis returned (S1567, S1577). When the SL switch is turned OFF, LENS-INF1data is inputted. If the zoom switch (a zoom speed change switch 75) isturned ON, a flag F₋₋ PZWAIT, which inhibits an initiation of a constantimage size zooming, is set and the flow is returned (S1567, S1577). Ifthe zoom speed change switch 75 is positioned at a neutral point (i.e.,when it is turned OFF), the flag F₋₋ PZWAIT is cleared and the focuscondition is checked. If it is out-of-focus, the flow is returned (S1571to S1575). If it is in-focus, an ISZ-MEMORY command for storing an imagesize, at the time when the SL switch is turned OFF or when the zoomspeed change switch 75 is returned to the neutral point (turned off), isoutputted to the camera lens, and the flow is returned. If none of theabove are applicable, the flow is directly returned (S1579 to S1583).

If none of the above modes are applicable, preset zooming and constantimage size zooming are stopped and the flow is returned after checkingthe end of preset zooming (S1513, S1541, S1561, S1585 to S1587).

IPZENDCHEK Operation

An IPZENDCHEK flowchart, shown in FIG. 62, is a body-side operationwhich finishes preset power zooming and constant image size zooming andchecks for the completion thereof.

Upon initiation of the IPZENDCHEK subroutine, during a constant imagesize zooming completion and constant image size zooming-on (F₋₋ISZSTOP=1, F₋₋ ISZON=1) or during a preset zooming completion and thepreset zooming-on (F₋₋ IPZSTOP=1, F₋₋ IPZON=1) state, an NGTIMER flagand an IPZEND flag are cleared, a transmission of an IPZ-STOP command tostop the power zoom is performed to clear the respective flags F₋₋ISZON, F₋₋ IPZON and BBATREQ, and the flow is returned after stoppingthe battery supply and checking it (S1601 to S1607, S1623 to S1631).

If it is not currently in the constant image size zooming-on or presetzooming-on state, a PZ-LSTATE data is inputted and it is determinedwhether the power zoom lens 51 is in the preset zooming-on or constantimage size zooming-on states. If not currently in the zooming-on(IPZB=0) state, a flag of preset zooming completion flag or constantimage size zooming completion is set and the flow is returned (S1601 toS1617). If currently in the preset zooming-on or constant image sizezooming-on (IPZB=1) states, the flow is returned unless an abnormaldetection timer (NG timer) expires (S1619).

Since it is expected that an abnormal event has occurred if the NG(abnormality detection) timer expires before the end of constant imagesize zooming, a TIMEUP flag is set (F₋₋ TIMEUP=1) and a NGTIMER flag andIPZEND flag are cleared (F₋₋ NGTIMERUP=0, F₋₋ IPZEND=0) (S1622-1,S1622-2). Then, a power zooming stop operation is performed (S1623 toS1631). If the NG timer has not yet expired, the flow is directlyreturned.

ISZ-DRIVE1 Operation

A flowchart (ISZ-DRIVE1) as shown in FIGS. 63 to 66 is an operation inbody CPU 31 in which the power zoom lens 51 (a lens CPU 61) is forced toperform a constant image size zooming operation. The ISZ-DRIVE operationis called at S1163, as shown in FIG. 53.

When the focusing lens is at its infinite position, data concerning anAF position is transmitted to the power zoom lens 51 by an AF-INTPOScommand (S1701, 1703). When the focusing lens is at its near position,PZ body state data concerning the power zoom mode of the camera body istransmitted to the power zoom lens 51 by PZ-BSTATE (S1701, S1705,S1707).

If a power zoom wait (F₋₋ PZWAIT=1) has been effected or if the resultof a predictor operation is invalid, the flow is returned without anyprocessing (S1709, S1711). If power zoom wait has not been effected andthe result of the predictor operation is valid, the focus condition ischecked (S1709 to S1713). If it is in-focus, it is determined whetherthe NG timer has been actuated F₋₋ NBTIMER=1). If it has not beenactuated, the NG timer is started and a flag F₋₋ NGTIMER is set,thereafter advancing to step S1721 (S1713, S1715, S1719, S1720). If theNG timer has already been actuated, the foregoing operation is skippedand the flow is advanced to S1721.

Next, after checking the completion of constant image size zooming atstep S1721 (IPZEND-CHECK), it is determined whether the completion ofthe same has occurred while in the constant image size zooming-on state(S1723, S1725). If in the constant image size zooming-on state (F₋₋ISZON=1) and the constant image size zooming has ended (IPZEND=1), flagIPZEND is cleared and flag ISZSTOP is set. Further, the flow is returnedafter an end operation of constant image size zooming is performed in anIPZEND-CHECK subroutine (S1725 to S1729).

If it is not in the constant image size constant zooming-on state or ifit is constant image size zooming has not ended, a transmission of dataconcerning the power zoom state in the camera body 11 is performed by aPZ-BSTATE command (S1723, S1725, S1731). Then, if it is not in theconstant image size zooming-on state, power the supply is requested ONby the body side and a test of the battery supply is performed. Further,after a flag identifying the continuation of constant image size zoomingis set, the flow advances to an in-focus judgment but the flow advancesto the in-focus judgment. However, if it is already in the constantimage size zooming-on state (S1733 to S1741), the flow directly advancesto the in-focus judgment.

If it is in-focus, in order to perform a constant image size zoomingbased on the current AF pulse (i.e., the value of AFPXL, AFPXH),predetermined data is transmitted to the power zoom lens 51 by theBODY-STATE 1 command. Further, after a transmission of a constant imagesize zooming start (ISZ-START) command is effected to start constantimage size zooming by the power zoom lens 51, the flow is returned(S1741 to S1745). If it is out-of-focus, defocus pulse data, measured bythe camera body 11, is transmitted by a STORE-DEFP & D command. Afterthat, data, by which the constant image size zooming is effected basedon the defocus pulse, is transmitted by a BODY-STATE1 command. Finally,a constant image size start command (ISZ-START) is transmitted, and theflow is returned.

ISZ-DRIVE2

Hereinafter, a second embodiment of the constant image size zoomingoperation shown in FIGS. 65 and 66 will be described. This secondembodiment is characterized in that the operations and controlsconcerning a constant image size zooming are performed in the camerabody 11.

Since the operations from S1801 to S1823 are similar to those from S1701to S1731, explanations are omitted. Hereinafter the operations fromS1825 will be described.

If the lens is not focused, transmission of data concerning the powerzoom state of the camera body 11 is performed by a PZ-BSTATE command(S1813, S1825 to S1833). Then, if the power zoom lens 51 is notundergoing a constant image size zooming, the power supply is requestedby the body side. The battery supply operation and the checking thereofare then performed. Additionally, a control zooming-on flag F₋₋ IPZON isset (S1827 to S1833).

Next, a transmission of a SET-PZPOINT command is issued designating anaddress of the lens RAM 61b in which the focal length, at the time ofimage size storing, is stored, and an input of the focal length(FOCALLEN-X data), at the time of image size storing and designated bythe SET-PZPOINT command, is issued from the power zoom lens 51 (S1835,S1837). Further, a transmission of a SET-AFPOINT command is effectedwith a designation of the focal length data, at the image size storing,stored in the lens RAM 61b, and an input of number of AF pulses(LENS-AFPULSE data), at the time of the image size storing, is effectedfrom the lens 51 (S1839, S1841). Then, the image size (x0f0) is operatedbased on the inputted data (S1843). Further, a transmission of theSET-AFPOINT command is effected with a designation of the current numberof the AF pulses and an input of the current number of the AF pulses,(LENS-AFPULSE data) is effected based on the designation from the lens51 (S1845, S1847).

Next, it is determined whether if the lens is in-focus and, in the casethat it is in-focus, the focal length is found from equation 4 byutilizing the current number x of AF pulses. If it is not in-focus, itis determined if the photographing image is a moving object. If it is amoving object, the focal length is calculated in the same manner as thatof the in-focus calculation, based on the present AF pulse. If it is nota moving object, a target focal length is found from equation 5utilizing the current number x of AF pulses and de-focus pulses Δx(S1849 to S1853). Then, after transmissions of a command by which thepower zoom is performed to the operated target focal length and thefocal length data (MOVE-PZF command), the flow is returned (S1855).

The lens CPU 61, receiving this MOVE-PZF command, drives a zooming lens53F to the target focal length sent from the camera body.

In this embodiment, the method for calculating the target focal lengthis changed according to the focusing state of the photographing lens.However, the method may be changed according to other conditions, forinstance, the condition of whether or not the moving object predictionmode is being effected.

In this case, a judgement operation "Is the photographing image a movingobject?" is to be added before S1853. In the case of a moving object,the target focal length is calculated, by the present lens moving amountat S1851. If it is not a moving object, the focal length is calculatedat S1853. The reason why the target focal length is calculated withoututilizing defocus amount when the moving object prediction mode iseffective, is to make the driving speed of the lens faster and morestable.

ISZ-DRIVE3

A constant image size zooming operation, shown in FIGS. 67 and 68,illustrates a third embodiment of the present invention. In thisembodiment, a modification of the constant image size zooming iscontrolled at the side of the body 11. In detail, in the case that theconstant image size zooming is effected after the lens comes into focusonce, the in-focus state may be shifted when the zooming is ended.Therefore, according to the third embodiment, the AF operation andconstant image size zooming are again effected after the constant imagesize zooming has ended. In addition, this embodiment is provided with amethod for driving the lens during constant image size zooming bychanging its speed depending on the speed of moving object at the timeof the moving object prediction AF.

If the focusing lens 53F is in the far position, an AF-INITPOS commandis transmitted to the taking lens (power zoom lens 51 (S1901, S1905,S1907)). If the focusing lens is in the near position, PZ body statedata concerning the power zoom mode of the camera body is transmitted tothe power zoom lens 51 by PZ-BSTATE command (S1901, S1905, S1907).

If the lens is in a power zoom wait mode or if the result of thepredictor operation is invalid, the flow returns without any processing(S1909, S1911).

If the lens is not in the power zoom wait mode and if th result of thepredictor operation is valid, it is checked whether a subject is amoving object (S1909 to S1913). If the subject is a moving object andthe constant image size zooming-on flag has been cleared (i.e., notduring constant image size zooming), a body's battery request flag (F₋₋BBATREQ=1) is set and battery supply is effected. Further, the constantimage size zooming-on flag (F₋₋ ISZON=1) is set (S1961 to S1967). Then,power zoom speed is set, depending on the speed of the moving object(moving speed on an image surface). Flag ISD is cleared to effect theISZ control by using the set power zoom speed data and the AF pulse atthe current position. Further, a transmission of an ISZ-START command iseffected through the BODY-STATE1 data communication to force the cameralens 51 to commence constant image size zooming (S1969 to S1973).

In the case that the object is not moving, it is checked if the lens isin-focus for the second time (F₋₋ INFOCUS=2) or the first time (F₋₋INFOCUS=1 (S1913, S1915, S1917)). Here, the F₋₋ INFOCUS is two bits. Ifthe lens is not in-focus for a first or second time, i.e., in an initialstate, it is checked if it is in-focus. If it is not in-focus, the flowis returned. In the case of an in-focus condition, body battery requestflag BBATREQ is set to effect the power supply, and the constant imagesize zooming-on flag F₋₋ ISZON is set (S1919 to S1925).

Then, the transmission of the constant image size zooming start commandis effected so that constant image size zooming and the NG timer arestarted. It is then determined whether the constant image size zoominghas ended. When it has ended, the first operation is ended after a firstin-focus condition flag is set and a constant image size zooming endflag F₋₋ IPZEND is cleared (S1935 to S1940).

The next time this operation is initiated, the flow moves from S1917 toS1941 because, the first in-focus flag is set. It is then recheckedwhether it is again in-focus. If it is not in-focus, the flow isreturned and the foregoing operation is repeated until an in-focuscondition is achieved. If it is in-focus, the NG timer is started andthe constant image size zooming start command is transmitted to thecamera lens to force the camera lens to start the constant image sizezooming. The flow is then returned after the second in-focus flag is set(S1943 to S1947).

If the ISZ-DRIVE 3 operation is initiated after the end of the S1947operation, the second in-focus flag is set so that the flow advancesfrom S1915 to S1951 and it is checked if the constant image size(control) zooming has ended. If the control zoom has not ended, the flowis returned. If the control zoom has ended, a control zoom end flagIPZEND is cleared and a constant image size zooming stop flagISZSTOP isset. The flow is then returned after the constant image size zooming endoperation is performed (S1953 to S1957).

AFP-CNT Operation

An AFP-CNT operation, shown in FIG. 69, is an AF pulse count operationin the power zoom lens 51. The lens CPU 61 comprises an AF pulse counterfor counting AF pulses outputted from an AF pulser 59 in a hardwaremanner. This AFP-CNT operation is initiated at 2 ms intervals by a 2 mstimer interrupt. This operation illustrates, in detail, the operation atS303 in the 2 ms timer interrupt routine, as shown in FIG. 9.

In the AFP-CNT operation, a count value of the AF pulse hard counter isfirst stored in an AF pulse count value memory (addresses AFPCNTL, H ofthe lens RAM 61b (S2001)). Then, by reference to data (i.e., datainstalled in bit 3-0 of PZ-BDST, which is a predetermined address of RAM61b) concerning an AF operation which is inputted by PZ-BSTATE commandwhen an AF motor 39 is moving the lens to the near end and before itarrives at the near end, the AF pulse count value is added to an AFpulse count start value (AFPSTRTL, H). This is stored in the current AFpulse value memory (AFPXL, H of the lens RAM 61b) before ending theroutine. However, if it arrives at the near end, the flow immediatelyends (S2002 to S2007).

When the AF motor 39 is moving the lens to the far end and before itarrives at the far end, the AF pulse count value is subtracted from thecurrent AF pulse count start value and the result is stored in thecurrent AF pulse value memory (AFPXL, H) to end the AFP-CNT operation.If it arrives at the far end, the AFP-CNT operation is immediately ended(S2009 to S2013). Also, if the lens is neither moving towards the nearend nor the far end, the AF motor does not rotate. Therefore the AFP-CNToperation ends without any processing (S2002, S2009).

AFP-ADJ Operation

An AFP-ADJ flowchart, as shown in FIG. 70, is an operation at the sideof the camera lens 51. It amends the current AF pulse value affected bybacklash and the like. In the present embodiment, the AF pulse value atthe far end is set at zero and the AF pulse value at the near end is setat the maximum value. Then, the present AF pulse count is amended everytime the brush 85 crosses one of the indicators 83 on the distance code81, in accordance with an absolute pulse number, which is to bedetermined by the position of the indicator 83, based on an absolutevalue code. The present operation is a detail of the 2 ms timerinterrupt routine at S307, as shown in FIG. 9.

Upon initiation of the AFP-ADJ operation, it is first checked if thebrush 85 has contacted the indicator 83. If not, the operation is ended(S2021). If it is contacted, the flow is directly returned in the casethat such a contact was achieved during the preceding operation (S2021,S2023). In other words, the time when the indicator 83 and the brush 85contact is detected (at an edge of the indicator 83).

If the indicator 83 and the brush 85 contact each other and such contactoccurs when the AF motor 39 is moving the lens to the far position, anAF pulse FAR table data (data concerning an edge at the near end side ofthe indicator 83) corresponding to the near end position of theindicator 83 is read and stored in addresses AFPCDL, H. If such contactoccurs during the near end movement, an AF pulse NEAR table data (dataconcerning an edge at the FAR end side of the indicator 83)corresponding to the far end position of the indicator 83 is read andstored in addresses AFPCDL, H (S2025 to S2033). The reason why there aretwo kinds of tables, i.e. the FAR table and the NEAR table is becausethe indicator 83 has a width and an absolute position at the contacttime which is different along the width, depending on the contactdirection. When the AF motor 39 is stopped, the flow is immediatelyended (S2027, S2031). Further, a flag F₋₋ AFPADJ at S2025 is providedfor test purposes and is usually cleared.

Next, if the current AF pulse value is known (when flag F₋₋ AFPOS isset), the current AF pulse count value (data of the AFPXL, H) issubtracted from the table data (AFPCDL, H) and its subtracted value(difference) is stored in an AF pulse error memory (AFPDIFXL, H (S2035,S2037)). Here, when the error is negative, the absolute value of theerror is stored in an AF pulse current value memory (S2039, S2041).

It is then checked whether the difference is larger than an allowableerror (N₋₋ AFPDIF). If it is smaller, the operation is directly ended.However, if it is larger, an amendment is effected: that is, the tabledata (AFPCDL, H) are incorporated into the current AF pulse value memory(AFPXL, H) and the AF pulse count start value memory (AFPSTARTL, H(S2043, S2045)). On the other hand, if the AF pulse current value is notknown, the amendment operation at S2045 is unconditionally performed(S2035, S2045).

Then, the AF pulse hard counter is cleared and started and the AF pulsecount start value (AFPCNTL, H) is cleared. After that, flag F₋₋ AFPOS,showing the current AF pulse value being known, is set and the operationends (S2047, S2049).

LMT-DTC Operation

A LMT-DTC flowchart, as shown in FIG. 71, is an operation on the side ofthe camera lens 51. This operation detects that a zooming lens group 53Zhas arrived at an end point, or that movement is prevented by someexternal circumstances (i.e., the lens group 53Z has arrived at apara-end point). According to the present embodiment, such detectionsare performed by checking if, during the driving of a PZ motor 65, thePZ pulses are outputted within a predetermined period of time. Further,the predetermined period of time is changed depending on a driving speedof the PZ motor (zooming speed). Also, since a starting torque becomeslarger for a constant period after the start of the PZ motor (i.e., upona transfer from a stop state or a braking state to a driving state), thedetection of the end point is not performed. The present operationillustrates the detail of the 2 ms timer interrupt routine at S351, asshown in FIG. 10.

First, it is determined whether the PZ motor is performing a drivingoperation. In the case of non-driving, the flow exits after clearance ofa limit counter T₋₋ LMT, which detects the arrival at a limit (i.e., theend point or the para-end point (S2061, S2071)). Specifically, a PWMtimer T₋₋ PWM is cleared when the PZ pulse is outputted to initiate thePZ pulse count interrupt operation, as shown in FIG. 12.

During the PZ drive, it is determined whether a counter T₋₋ START, whichmeasures the time since the start, becomes zero (i.e., whether apredetermined period of time has expired). In the case that it is notzero, the counter T₋₋ START is decremented by one and the limit counterT₋₋ LMT is cleared to leave the operation (S2061, S2063, S2069, S2071).This processing is initiated every 2 ms so that the counter T₋₋ START isdecremented every 2 ms. The value of the counter T₋₋ START is set at apredetermined value when the zoom motor is started, but the end pointdetection is not performed within a constant period after that start.

The fact that the counter T₋₋ START becomes zero means that apredetermined time has expired after the motor start. As a result, theflow advances to the operation of end point detections, from S2065.

In the case where a duty ratio T₋₋ PWMBRK of a PWM becomes more than itsmaximum limit value N₋₋ PWMMAX, counter T₋₋ LMT for the end pointdetection is incremented by one and the flow advances to S2073. In theopposite case, the flow exits and advances to S2073 (S2065, S2067).Also, if the motor is engaged in DC drive (i.e., the maximum speeddrive), the value of the maximum limit value N₋₋ PWMMAX, as a duty ratioT₋₋ PWMBRK, is established. Therefore, during the DC drive, the limitcounter T₋₋ LMT is incremented by one (S2065, S2067).

Next, a PWM drive of the zoom motor is controlled as follows:

The PWM duty ratio T₋₋ PWMBRK is usually set at a smaller value than themaximum limit value N₋₋ PWMMAX.

Accordingly, counter T₋₋ LMT is not incremented and the flow exits(S2065, S2073). However, if the PZ pulse is not outputted for a constantperiod of time, the duty ratio T₋₋ PWMBRK is gradually increased by the2 ms timer routine and becomes a value similar to the maximum limitvalue N₋₋ PWMMAX (generally DC drive) after a predetermined period tolet counter T₋₋ LMT be incremented by one.

Here, in the case of the PWM low speed drive, the value of the PWM dutyratio T₋₋ PWMBRK is small in the beginning. Therefore, upon arrival atthe end point or the para-end point, it takes a long time for thecounter T₋₋ LMT to be incremented.

In the case of the PWM high speed drive<the value of the PWM duty ratioT₋₋ PWMBRK is large. Therefore, upon arrival at the end point or thepara-end point, it takes a shorter time for the counter T₋₋ LMT to beincremented in comparison with that of the PWM low speed drive.

With the above processing, it is possible to change the end pointdetection time depending on the zoom motor drive speed (S2063, S2067).Further, if the counter T₋₋ LMT is below a predetermined value (N₋₋LMT), a predetermined end point detection period will have not yetexpired so that the flow immediately leaves this subroutine (S2073).

If the counter T₋₋ LMT increases beyond the predetermined value N₋₋ LMT,it is regarded as the end point or the para-end point. In the case of atele-direction drive, a tele end flag F₋₋ TEND is set if a zoom code isa tele end value. However, if the zoom code is not the tele end value,its stop is effected by any abnormality and therefore a para-tele endflag F₋₋ LMT is set (S2075 to S2081). In the case of a wide-directiondrive, a wide end flag F₋₋ WEND is set if a wide code is the wide endvalue. However, if the zoom code is not a wide end value, its stop iseffected by any abnormality and therefore a para-wide end flag F₋₋ LMTWis set (S2075, S2083 to S2087).

SET-ST Operation

A SET-ST flowchart as shown in FIGS. 72 to 80 is an operation at theside of the power zoom lens 51 and configured to settle a status (speedcontrol bit) such as controls of rotational direction, speed, stop andbrake of the zoom motor. The present operation is a detail of the 2 msinterrupt routine, as shown in FIG. 10. Further, this SET-ST operationincludes, as shown in FIGS. 72 to 80, a MOV operation, an INIT3interrupt operation, a NO-MOVE, a MOV1 operation, BRK1, 2-operation, aSTP1 operation, a MOV-TRG operation and a DRV-TRG8 operation.

Firstly, a power request flag F₋₋ BATREQ is set and position of the zoomspeed change switch 75 is transformed into a predetermined code (whichindicates its direction and speed). Thereafter the code is stored in atransformed value memory TRNSSPD (S2101, S2103).

If the lens is driven towards a designated position (F₋₋ MOVTARG=1), theflow advances to the MOV₋₋ TRG operation. If it is an usual move ordrive in a designated direction (i.e., when a F₋₋ MOV is set), the flowadvances to the MOV operation (S2105, S2107).

If it does not correspond to any move or drive and a zoom operation ringis located on a neutral position (when the zoom switch 75 is turned OFF,the flow advances to the MOV-TARG operation when in the image sizeconstant zoom mode while the flow advances to the NO-MOV operation whenin the non-image size constant zoom mode (S2109, S2115). If the zoomoperation ring is not located in the neutral position, the flow advancesto the NO-MOV operation when a manual power zoom stop bit is set (F₋₋MPZD=1). If not, manual power zooming is being effected, and therefore,the flow advances to the MOV operation with a storage of a zoom speeddata, which is transformed from a zoom switch status, in an addressSPDDRC1 (S2109, S2111, S2113).

In the above operation, since upon initiation of a release operation inthe body and the like, a flag F₋₋ MPZD is set by a communication commandBODY-STATE1 (22), the manual power zoom operation during the release canbe stopped. Also, upon reception of a transmission of a communicationcommand IPZ-STOP (35) for stopping the power zoom, the respective flagssuch as F₋₋ MOVTRG, F₋₋ MOV and F₋₋ ISZ are cleared. Therefore, powerzoom operations in addition to the manual power zoom can be stopped.

MOV Operation

Next, control of the power zoom motor will be described with referenceto a MOV flowchart, as shown in FIGS. 73 to 75. This control is anoperation in the body power lens 51 and concerns manual zooming andcontrolled power zooming in a designated direction (i.e., when the flagF₋₋ MOV is set up).

Firstly, it is checked (i.e., bit0 of a move direction memory SPDDRC1)if movement is in the tele direction (F₋₋ TELE1=1 (S2201)).

If the direction of movement is in the tele direction and it arrives atthe tele end or para-tele end, the flow advances to the NO-MOV operation(S2201 to S2205). If it is an initial movement (or a start), the flowadvances to an operation S2233 for initialization (S2207). Then byreference to data concerning the previous zooming motor operation storedin the memory ZM-ST1, which is used for operating the zoom motor, ifmovement occurred the preceding time, but in a different direction (ofthe zoom motor), or if the power supply from the body is turned off, theflow advances to the brake operation (BRK1 [S2207 to S2211]). If, at thepresent time, the movement is in the same direction as that of thepreceding operation and the power supply is turned ON, the flow advancesto a speed settle operation at S2249 (S2207 to S2211).

If the movement is not in the tele direction, but arrives at the wideend or the para-wide end (F₋₋ WEND=1 or F₋₋ LMTW=1), the flow advancesto the NO-MOV operation (S2201, S2223, S2225). If the lens starts, butdoes not arrive at the wide end or the para-wide end, the flow advancesto a processing S2233 for initialization. If movement occurred thepreceding time, but the present movement is in a different direction orif the power supply from the body is turned OFF, the flow advances tothe brake operation (BRK1). If the present movement is in the samedirection as that at the preceding movement and if the power supply isturned ON, the flow advances to the speed settle operation at S2249(S2225 to S2231).

The initial set up operation upon start-up is executed on condition thatpower from a power source is being supplied. If power is not beingsupplied, the operation proceeds to an ending process (NO-MOV1 [S2233represents the foregoing operation]).

When power is being supplied, the brake counter T₋₋ BRK is incrementedby 1, if the brake flag F₋₋ BRK is set (i.e., when the motor is beingbraked). If the brake counter T₋₋ BRK is less than a predetermined value(N₋₋ BRKREV), the operation proceeds to a brake 2 operation (BRK2) atwhich point a brake is applied (S2235 through S2239).

When the brake flag F₋₋ BRK has been cleared, or if it has been setwhile the brake timer T₋₋ BRK is greater than a predetermined value,braking is completed. In such a case, the start up flag F₋₋ START isset, and the limit timer T₋₋ LMT and the PWM timer, T₋₋ PWM, arecleared. Then, a counter is set so that a terminal detection does nottake place for a certain period of time after the start-up, and theinitial value (i.e., minimum value) of the PWM duty ratio is set (S2235through S2241 represent the foregoing operation). This means that thestart flag F₋₋ START is set, terminal detecting counter T₋₋ LMT and PWMcounter T₋₋ PWM are cleared, an initial value is entered at the startcounter T₋₋ START, and a duty ratio T₋₋ PWMBRK of PWM is filled with theminimum value. Setting the minimum value at T₋₋ PWMBRK provides theslowest start-up for PWM.

Upon completion of the setting operation, the LED of the PZ pulser 69 isturned ON to prepare for the PZ pulse count. Then, the PZ pulse countinterruption (INT3) is enabled, if it was disabled, before proceeding toa speed setting operation [S2249 (S2243 through S2247 represent theforegoing operations]).

In the speed setting operation, a PZ pulse interval (T₋₋ PWMPLS value)is set according to the speed selected. In this preferred embodiment,the time during which electricity is supplied at PWM is controlled sothat PZ pulses are outputted at the selected PZ pulse interval. Fourspeeds can be selected in this preferred embodiment, but not limited tofour. The speed is selected according to the two bits, bits 2 and 3 (F₋₋SPDA1, F₋₋ SPDB1), of SPDDRC1. Since the fourth speed is not controlledby the PWM control, but rather by the DC control, a PZ pulse interval isnot set. The Maximum value is set at PWM duty ratio T₋₋ PWMBRK forterminal detection (S2065 in FIG. 71).

Upon completion of the speed selection, the speed and its direction(SPDDRC1) are inputted in the zoom control memory (ZM-ST1), drive flagF₋₋ DRV is set, and brake flag F₋₋ BRK is cleared (S2251). Bit 3-0 ofZM-ST1 (i.e., flags SPD1, SPD0, DRCW, DRCT) are set so that the flagscorrespond to bit 3-0 of SPDDRC1 (i.e., flags SPDB1, SPDA1, WIDE1,TELE1), respectively. The telephoto end and wide-angle end dummy flags,F₋₋ LMTT and LMTW, are then cleared. The drive direction flags, F₋₋TMOV, F₋₋ WMOV, F₋₋ TELE1, F₋₋ WIDE1, are set while the telephoto endand wide-angle end flags, F₋₋ TEND and F₋₋ WEND, are cleared (S2253through S2257 represent the foregoing operations). F₋₋ TMOV, F₋₋ WMOV,F₋₋ TEND and F₋₋ WEND are flags for the PZ-LST data, and are set so thatflags F₋₋ TMOV and F₋₋ WMOV correspond to F₋₋ TELE1, F₋₋ WID1 ofSPDDRC1, respectively. In the case that either one of F₋₋ TMOV and F₋₋WMOV is set, the other is cleared.

During the zooming operation at a constant image magnification, manualpower zooming is activated by interrupting the constant imagemagnification. Predetermined bits are set at the memory data (PZ₋₋ LST)for the PZ conditions of the lens, and the flag is set before processingis completed (S2259 and S2267). When zooming is not being performed at aconstant image magnification, if power zooming (manual power zooming) isbeing effected by a zoom switch operation, data including flag F₋₋ MPZfor manual power zooming is set at the zoom condition data (PZ-LST). Ifcontrolled power zooming (i.e., zooming to a specified direction) isbeing effected, data (including flag F₋₋ IPZB) for the controlled powerzooming are entered at the zooming condition data PZ-LST), before theSET-ST operation is completed (S2261 through S2265 represent theforegoing processes). The content of the PZ₋₋ LST data is transmitted tothe camera body by means of communication using command PZ-LSTATE(10).

INIT3 Interruption Enabling Operation

FIG. 76 shows an operation that enables interruptions by the PZ pulsecount. In this preferred embodiment, the PZ pulse counting is effectedby software using an interruption of a 2-ms timer. In this process, theenabling bit for the INIT interruption is set to enable counterinterruptions by PZ pulses. This operation shows the details of stepS2247 in FIG. 74 and S2457 in FIG. 82.

NO-MOV and NO-MOV1 Operations

Flow charts NO-MOV and MOV1 shown in FIG. 77 are operations that stopthe power zooming operation or effect a shift to a braking operation.When power zooming is being effected (i.e., when flag F₋₋ DRV has beenset), the operation proceeds to the BRK1 operation. If power zooming isnot being effected, and if the brake is not being effected (i.e., flagF₋₋ BRK has been cleared), the operation proceeds to the endingoperation (STP1). If the brake is being effected, the brake counter isincremented by 1, and if the value exceeds a predetermined value (N₋₋BRK), the ending operation (STP1) is executed. If the value is less thanthe predetermined value, the operation proceeds to Brake 2 (BRK2) tocontinue the braking operation (S2301 through S2307 represent theforegoing processes). Since this NO-MOV1 operation is performed whenpower zooming is not being effected, the process begins from step S2303,skipping step S2301.

BRK1 and BRK2 Operations

In the brake operation (BRK1) in FIG. 78, brake timer T₋₋ BRK is clearedand the telephoto direction flag F₋₋ DRCT, wide-angle direction flag F₋₋DRCW, speed-1 flag F₋₋ SPD0, speed-2 flag F₋₋ SPD1, and drive flag F₋₋DRV are cleared. Brake flag F₋₋ BRK is then set (S2311 and S2313represent the foregoing processes). Since BRK2 is entered only after thesecond operation, only step S2313 is executed. After completing theabove operations, the SET-ST operation is completed.

STP1 Operation

The STP1 flow chart shown in FIG. 79 is an operation for stopping thepower zooming operation.

First, the PZ pulse count interruption is disabled, and the LED of thePZ pulser 69 is turned off (S2321 and S2323).

When the zoom switch 75 is at the neutral position, ZM₋₋ ST1 data iscleared (i.e., all the flags are cleared), and a battery request iscancelled (S2327, S2337 and S2347) before proceeding to step S2349. Whenthe zoom switch 75 returns to the neutral position, the dummy terminalflags (F₋₋ LMTT and F₋₋ LMTW) are cleared. Therefore, zooming can alsobe performed in the direction that the dummy terminal was previouslyset.

When the zoom switch 75 is not set at the neutral position, but ratherthe telephoto direction, flags F₋₋ LMTT and F₋₋ LMTW in the ZM₋₋ ST1data are left unchanged, while all the other flags are cleared (S2329,S2331). If the lens is at the telephoto end, or at the pseudo-telephotoend, a battery request is cancelled before proceeding to S2349. If thelens is neither at the telephoto end nor the pseudo-telephoto end, thebattery request is not cancelled, and the operation proceeds to stepS2349 (S2333 and S2335 represent the foregoing processes). When the zoommotor 65 is revolving toward the wide-angle direction, flags F₋₋ LMTTand F₋₋ LMTW in the ZM₋₋ ST1 data are left unchanged, while other flagsare cleared (S2329 and S2341). In the wide-angle end or in thepseudo-wide-angle end, the battery request is cancelled beforeproceeding to step S2349. If, however, the lens is neither at thetelephoto end nor the pseudo-telephoto end, the battery request is notcancelled before proceeding to step S2349 (S2343 and S2345 represent theforegoing processes).

In S2349, whether zooming with a constant image magnification is beingeffected is tested. In step S2351, whether a calculation for zoomingwith a constant image magnification has been completed is tested. Ifzooming with a constant image magnification is in operation, but thecalculation has not been completed, flags F₋₋ TEND, F₋₋ WEND, F₋₋ IPZBand F₋₋ ISZOK in the PZ₋₋ LST data are left unchanged, while other flagsF₋₋ TMOV, F₋₋ WMOV, F₋₋ IPZI and F₋₋ MPZ are cleared (S2353). If zoomingwith a constant image magnification is not being effected, or if thecalculation has not been completed during zooming with a constant imagemagnification, flags F₋₋ TEND and F₋₋ WEND in the PZ₋₋ LST data are leftunchanged, while other flags are cleared (S2355). The content of dataPZ₋₋ LST is transmitted to the camera body 11 by means of acommunication using the PZ-LSTATE(10) command.

The logical sum of the ZM-ST2 data and a predetermined data is stored inZM-ST2. The start flag F₋₋ START, the zoom flag for constant imagemagnification, F₋₋ ISZ, the specified direction drive flag F₋₋ MOVTARG,the specified position drive flags, F₋₋ MOVPLS and F₋₋ MOVZC, etc. areall cleared, after which the SET-ST operation is completed (S2357). Thismeans, flags F₋₋ PZPOS and F₋₋ PZPDRC in the ZM-ST2 data are leftunchanged, while other flags are cleared.

Flag F₋₋ PZDRC has the same function as those of flags F₋₋ DRCW and F₋₋DRCT in the data of ZM-ST1. Flag F₋₋ PZDRC indicates that the lens isdriven to the wide end when F₋₋ PZDRC=1 and that the lens is driven tothe tele end when F₋₋ PZDRC=0.

MOV-TRG Operation

The flow chart shown in FIG. 81 is the MOV-TRG operation for driving thezoom lens to a desired position. First, whether or not the targetednumber of PZ pulses is greater than the present PZ pulse is checked(S2401). If it is greater, driving is effected in the telephotodirection, while if it is smaller, driving is effected in the wide-angledirection.

When the driving operation is effected in the telephoto direction, thetargeted number of PZ pulses (PZPTRGT) is subtracted by the presentnumber of pulses (PZPX), and the difference is stored in the memory(PZPDIF) as the number of driving pulses (S2403). If the targeted numberof pulses and the present number of pulses are equal, the operationproceeds to NO-MOV (S2405) because the driving operation is notnecessary. If they are not equal, the direction of the motor drivingoperation is temporarily set for the telephoto direction. If it iseither in the telephoto end or in the pseudo-telephoto end, theoperation proceeds to NO-MOV (S2407 through S2411). If it is neither thetelephoto end nor pseudo-telephoto end, but during the drivingoperation, the operation proceeds to BRK1 if the wide direction flag F₋₋DRCW is set, or if the battery is turned OFF (S2413 through S2417). Ifdriving is being effected in the same direction, and if the battery isON, the operation proceeds to DRV-TRG8 (S2413 through S2417). If it isnot being driven, the operation proceeds to S2441.

When driving is being effected in the wide-angle direction, the targetednumber of pulses (PZPTRGR) is subtracted from the present number ofpulses (PZPX), and the difference is stored in the memory (PZPDIF) asthe number of driving pulses (S2423). The driving direction of the zoommotor is then temporarily set for the wide-angle direction, and if it isin the wide terminal or in the pseudo-wide terminal, the operationproceeds to NO-MOV (S2427 through S2431).

If the lens is neither at the wide-angle end nor the pseudo-wide-angleend, but rather in the midst of the driving operation, the operationproceeds to BRK1, if the telephoto direction flag F₋₋ DRCT is ON or ifthe battery is turned ON (S2433 through S2437). If driving is beingeffected in the same direction, and if the battery is turned ON, theoperation proceeds to DRV-TRG8 (S2433 through S2437). If driving is notcurrently being effected, the operation proceeds to S2441.

In this control method, the possibility exists that an excess pulse willoccur as a result of the driving being changed to braking when thetargeted PZ pulses and the present PZ pulses become equal. However,since an excess pulse is of minimal importance, the operation proceedsto NO-MOV1 when the difference pulse PZPDIF is 1, or when it is not 1but power supply is turned OFF (S2441 through S2443).

When the difference pulse PZPDIF is not 1, and when the power supply isON, the brake counter T₋₋ BRK is incremented by 1, if the brake flag F₋₋BRK is set. If the brake counter T₋₋ BRK is smaller than a predeterminedvalue, the operation proceeds to the braking operation (BRK2 (S2443through S2449 represent the foregoing processes)).

If the brake flag F₋₋ BRK has been cleared, or if the brake counter T₋₋BRK is greater than a predetermined value, the brake operation iscompleted. The start-up flag F₋₋ START is set, and the limit timer andthe PWM timer are cleared. The counter is then set so that terminaldetection is not performed for a certain period of time after start-up,and an initial value (i.e., the minimum value) is set for the PWM dutyratio (S2451). This means, the start flag F₋₋ START is set, the terminaldetecting counter T₋₋ LMT and PWM counter T₋₋ PWM are cleared, aninitial value is entered in the start counter T₋₋ START, and the minimumvalue is entered in the PWM duty ratio T₋₋ PWMBRK.

Upon completion of the setting operation, the LED of the PZ pulser 69 isturned ON to prepare for the PZ pulse counting. If the PZ pulseinterruption is not enabled, it is enabled before proceeding to DRV-TRG8(S2453 through S2457).

DRV-TRG8 Operation

The DRV-TRG8 operation shown in FIGS. 83 and 84 is an operation tocontrol the speed according to the number of the driving PZ pulses untilthe targeted focal distance is reached, and in which speeds are changedin several steps in accordance with the number of pulses to the targetedposition (PZPDIF). In this preferred embodiment, when the number ofdriving pulses to the target is equal to or above that of the thirdpulse, driving is done at the fourth speed (DC driving), which is themaximum speed. When it is less than that of the third pulse, but equalto or above that of the second pulse, driving is done at the thirdspeed. When it is less than that of the second pulse, but equal to orabove that of the first pulse, the second speed is selected. When it isless than that of the first pulse, the first speed is selected. In thisoperation, the fourth speed is greater than the third, which is greaterthan the second, which is greater than the first. The number of thethird pulses is greater than the second, which is greater than thefirst. Also in this preferred embodiment, four speeds can be selected.However, the number of speeds may be more or less than four, or a largenumber of steps for effecting an almost continuously variable speed.

First, a speed selection operation (S2501) is performed in accordancewith the selected zooming speed. That is to say, when the first speed isselected, the operation proceeds to step S2503, the second speed to stepS2511, the third speed to step S2521, and the fourth speed to stepS2541, respectively. The selection of the speed is based on the value inbits 2 and 3 (F₋₋ SPDA2 and F₋₋ SPDB2) of SPDDRC2.

SPDDRC2 is utilized when the target position has been set. The zoomingdirection, at the time when the lens starts to be driven, and thezooming speed, which is automatically set by the main CPU 35 or the lensCPU61, are set in the SPDDRC2.

When the first speed is selected, whether there are any changes in thespeed and its driving direction (the value of ZM-ST1) is tested. Ifthere are changes, the standard value for the first speed N₋₋ PWMMI0 isset at the PWM brake timer (PWM duty ratio). If there are no changes,nothing is done at this stage. Then the PZ pulse cycle N₋₋ PWMPO of thefirst speed is set at T-PWMPLS, and the logical sum of R₋₋ INT and apredetermined data is stored in ZM-ST1 (i.e., setting of the speed andits direction (S2503 through S2509 represent the foregoing operations)).By means of the above operations, the slowest speed is selected. Thelogical sum of the PZ-LST data and a predetermined data is computed.Further, a logical sum of the above mentioned sum and the R₋₋ INT datais stored in the PZ-LST data, before the SET-ST operation is completed(S2551).

When the second speed is selected, whether the number of pulses to thetarget position is equal to or above that of the first pulses is tested.If it is smaller, the operation proceeds to DRVPWM0 (S2503 for the firstspeed). If it is equal to or above, the operation proceeds to stepS2513, in which it is determined whether there are any changes its speedor its direction (i.e., the value of ZM-ST1) is tested to control at thesecond speed. If there are any changes, the standard value of the secondspeed is set at PWM brake timer (PWM duty ratio). If there are nochanges, an operation is not performed. Cycle N₋₋ PWMP1 of the PZ pulsefor the second speed is then set at T-PWMPLS. The logical sum of the R₋₋INT data and a predetermined data is stored in ZM-ST1 before proceedingto S2551, S2503 through S2509 represents the foregoing operations,wherein the second speed is selected.

When the third speed is selected, whether the number of pulses to thetarget position (PZPDIF) is less than that of the first pulses istested. If it is smaller, the operation proceeds to step S2503 (DRVPWM0)for the first speed. If it is equal to or above the number of firstpulses, and less than that of the second pulses, the operation proceedsto DRVPWM1 for the second speed operation (S2521 and S2523). If it isequal to or above the number of second pulses, the control is performedat the third speed. Whether there are any changes in speed and direction(i.e., the value of ZM-ST1) is tested. If there are any changes, thestandard value, N₋₋ PWMMI2 of the third speed, is set at PWM brake timer(PWM duty ratio). If there are no changes, no operation is performed.The cycle N₋₋ PWMP2 of the PZ pulse for the third speed is then set atT-PWMPLS. The logical sum of the R₋₋ INT data and predetermined data isstored in ZM-ST1 before proceeding to step S2551. Steps S2523 throughS2531 represent the foregoing operations, wherein the third speed isselected.

When the fourth speed is selected, whether the number of pulses to thetarget (PZPDIF) is equal to or above that of the first pulses is tested.If it is less than the number of first pulses, the operation proceeds tostep S2503 (DRVPWM0) for the first speed processing. If it is equal toor above the number of the first pulses, and less than the number of thesecond pulses, the operation proceeds to DRVPW1 for the second speedprocessing. If it is equal to or above the number of the second pulses,and less than the number of the third pulses, the operation proceeds toDRVPWM2. If it is equal to or above the number of third pulses, themaximum value N₋₋ PWMMAX is set at the PWM brake timer (PWM duty ratio),and the logical sum of R₋₋ INT data and a predetermined data is set atZM-ST1, before proceeding to step S2551. Steps S2547 and S2549 representthe foregoing operations. The fourth speed (DC drive) is selected.

PZP-CNT Operation

PZP-CNT flow charts shown in FIGS. 85 through 89 are for operationsregarding the PZ pulse count. These are the details of step S335 in theinterruption routine for a 2 ms timer in FIG. 10.

To calibrate the PZ pulse (i.e., when F₋₋ PZPADJ=0) when the zoom lensgroup 53Z is at the wide-angle end, the present PZ pulse value and thePZ pulse count starting value are reset to zero. Then, if flag F₋₋PZPOS, which shows whether the present position is known, has been set,the operation proceeds to PZP-CNT5. If the present position flag hasbeen cleared, the operation proceeds to the initializing operation(PZ-INIT) of the power zoom (S2601 through S2605 and S2615 represent theforegoing operations). When the calibration is not carried out, if thepresent position is known (i.e., when F₋₋ PZPOS=1), the operationproceeds to the present-position OK operation (POS-OK). IF the presentposition is unknown (F₋₋ PZPOS=0), the operation proceeds to thepresent-position unknown operation (FOS-NG (S2603 and S2607 representthe foregoing operations)).

Likewise, to calibrate the PZ pulse when the zoom lens is at thetelephoto end, the present PZ pulse value and the PZ pulse countstarting value are set to the maximum (N₋₋ PZPMAX). If the flag thatshows the present position as being known has been set, the operationproceeds to the PZP-CNT5. If the flag has been cleared, the operationproceeds to the PZ initializing operation (PZ-INT (S2609, S2611, S2613,and S2615 represent the foregoing operations)). When no calibration isneeded, if the present position is known (i.e., when the flag is on),the operation proceeds to the present-position OK operation (POS-OK),but if the present position is not known, the operation proceeds to thepresent-position unknown (POS-NG) operation (S2611 and S2607). Asexplained above, when the zoom lens group 53Z is at the wide-angle end(F₋₋ WEND=1), or at the telephoto end (F₋₋ TEND=1), the PZ pulse iscalibrated with a predetermined value. F₋₋ PZPADJ is a flag for testing,and when F₋₋ PZPADJ=1, the calibration is not performed.

When the lens is neither at the telephoto end nor at the wide-angle end,if the present position is known, the operation proceeds to thepresent-position OK operation (POS-OK), but if the present position isunknown, the operation proceeds to the present-position unknownoperation (POS-NG (S2601, S2611 and S2607 represent the foregoingoperations)).

POS-NG and PZ-INIT Operations

POS-NG and PZ-INIT, shown in FIGS. 86 and 87, are operations that areeffective when the present position is unknown, or when the telephotoend or wide-angle end has been reached.

The POS-NG and PZ-INIT operations are executed when the present positionof the zoom lens is unknown. Usually, if the present position is notknown, the POS-NG and PZ-INIT operations are also executed when theinitializing command PZ-INITPOS (32) is transmitted from the camera bodywhen the main switch in the camera body is turned on, or when thezooming operation is switched from manual to power.

In this preferred embodiment, when the PZ-INITPOS command istransmitted, the zoom lens group 53Z is moved towards the telephoto endat the slowest speed. The present position of the zoom lens group can bedetected by storing the number of absolute PZ pulses in a certainaddress (PZPX and PZPSTRT) at the position where the first divisionalpoint 72 of the zoom code plate 71 or the telephoto end is detected.Further, in this embodiment, the zoom lens group 53Z is returned to itsoriginal position after detecting the present position. This can be doneby the following procedures: when the PZ₋₋ INITPOS command istransmitted, a counter (PZPAZB) is cleared (making it zero) the firstdivisional point on the zoom code plate or the PZ pulse to the telephotoend is counted, and the zoom lens is returned from that position (i.e.,when the present position is detected) to the position with which thecount corresponds. This returning operation of the zoom lens isperformed in the PZ-INIT operation (especially in S2637 through S2649).

The operation of the zoom lens at the slowest speed is executed by thePZ-INITPOS command through communication.

In this preferred embodiment, the lens is driven towards the telephotoend in a uniform manner to detect the present position. However, thismay be towards the wide-angle end, or either direction may be selectedbased on other conditions.

Furthermore, in this preferred embodiment, when the present position isunknown, it can be detected automatically (i.e., the present positioncan be known), even if the P₋₋ INITPOS command is not transmitted fromthe camera body 51 at the time the lens has reached at a divisionalpoint on the zoom code plate or the terminal points (i.e., far sideand/or near side) when the manual power zoom is operated.

When the operation enters the POS-NG operation, if the start flag F₋₋START has been set (i.e., at the time the zoom motor is activated), thePZ pulse conversion value (i.e., roughly detected PZ pulse value) on thezoom code plate 71, which is read-in for the operation, is set at thepresent position and the start pulse counter. The operation proceeds tothe zoom driving operation (DRIVSTART1 (S2621 and S2623 represent theforegoing operations)).

The following operation is performed when the start flag F₋₋ START isset OFF: When the zoom code is the same as the previous one, theswitching point has not been reached. The execution then exits the PZP₋₋CNT operation (S2623 and S2625). When the zoom code has been changed(i.e., when at the divisional point on the code plate), the PZ pulseconversion of the zoom code, which is entered for the present operation,is entered at the present PZ pulse value (PZPX) and PZ pulse countstarting value (PZPSTRT), if the driving is towards the telephoto side(F₋₋ PZPDRC=0). If the driving is the wide-angle side (F₋₋ PZPDRC=1),the PZ pulse conversion value of the zoom code that was enteredpreviously, is entered at the PZ pulse value (PZPX) and the PZ pulsecount starting value (PZPSTRT (S2627 through S2631 represent theforegoing operations)).

When the move flag (F₋₋ MOV) has been cleared (i.e., when the PZ₋₋INITPOS command has not been transmitted), or when flag F₋₋ PZPINIT hasbeen set, flag F₋₋ PZPOS, which indicates recognition of the presentposition, is set when flag F₋₋ PZPINIT has been set before proceeding tothe pulse count (PZP-CNT5) operation (S2633, S2635 and S2649).

When move flag F₋₋ MOV has been set (i.e., the PZ-INITPOS command hasbeen transmitted), and when the present position flag F₋₋ PZPINIT hasbeen turned OFF, the targeted PZ pulse (PZPTRGT) is the present PZ pulsevalue (i.e., the code plate border value) subtracted by the PZ pulsecount value (PZPAZB) from the original position before the PZinitializing to the border position on the code plate (S2633, S2635 andS2637). The F₋₋ PZPINIT is a flag for disabling the initializingoperation of PZ, and is used for testing. When F₋₋ PZPINIT=1, theoperation is disabled.

A borrow in the above subtraction is indicative of an error in thecounting process. In such a case, the targeted number of PZ pulses isset to zero to clear the drive flag F₋₋ MOV. If there is no borrow, themove flag is cleared without any other processing (S2639 and S2641).Then, the move flag for the target value (F₋₋ MOVTRG) is set ON, the PZspeed is set to the first speed (the slowest speed), and the presentposition flag is set ON, after which the operation proceeds to thePZP-CNT5 operation (S2643 through S2649).

When the operation starts at the PZ-INIT operation, S2633 is thestarting set.

POS-OK and DRVSTRT1 Operations

The POS-OK operation shown in FIG. 88 is the PZ pulse counting operationin which the present position is known.

When the operation has already started (i.e., the start flag has beencleared), the operation proceeds to the PZ pulse calibrating operation(PZP-ADJ operation). When the operation is about to start, if thedriving operation is effected in the telephoto direction (F₋₋ PZPDRC=0),the sum of the PZ pulse count staring value (PZPSTRT) and the PZ pulsecount value (PZPCNT) is entered into the PZ pulse count starting value(PZPATRT) and into the present PZ pulse count value (PZPX). If thedriving operation is effected in the side-angle direction (F₋₋PZPDRC=1), the PZ pulse count starting value (PZPSTRT) is subtracted bythe PZ pulse count value (PZPCNT) and entered into the PZ pulse countstarting value (PZPSTRT) and into the present PZ pulse count value (PZPX(S2651 through S2657 represent the foregoing operations)).

Start flag F₋₋ START is then cleared, and the power zooming directionflag F₋₋ PZPDRC is cleared (i.e., the telephoto direction is selected)when the driving operation is effected in the telephoto direction (i.e.,the direction toward which the lens is going to move this time). If themovement is effected in the wide-angle direction (i.e., the currentdirection towards which the lens is going), the power zooming directionflag F₋₋ PZPDRC is set (i.e., the wide-angle direction is selected(S2659 through S2665 represent the foregoing operations)).

When the operation begins from DRIVSTART1, step S2659 is the first step.The start flag is cleared, and the driving direction is set in stepsS2659 through S2665.

PZP-ADJ and PZP-CNT5 Operations

The PZP-ADJ operation, shown in FIG. 89, is for calibrating calculationerrors of the PZ pulse count.

The zoom code is first checked if it is the same as the previous code.If it is the same, the flow exits the PZP-ADJ operation becausecalibration is impossible. If it is different, the calibration operationcontinues, provided that the PZP calibration disabling flag F₋₋ PZDADJhas been cleared, i.e. waits until it exceeds the divisional region(border) of the code plate 71. In this operation, the PZP calibrationdisabling flag F₋₋ PZDADJ is for testing, and is usually cleared.

If the direction of the power zooming operation is towards the telephotodirection, the present pulse conversion value of the zoom code is storedin register X. If the direction is towards the wide-angle direction, theprevious pulse conversion value of the zoom code is stored in registerX, and the value in register X is stored in the accumulator to check ifthe absolute value of the difference between this value and the PZ pulsevalue is within the calibration limit (S2679 through S2683). If itexceeds the calibration limit, the value of register X is stored in thepresent PZ pulse value and in the PZ pulse count starting value toperform a calibration. If it is within the calibration limit, nocalibration is performed. The PZ pulse count value (PZPCNT) is cleared,and the number of the PZ pulses at the present focal distance isconverted to the present focal distance (mm), based on table data. It isthen stored in FCLXL and H, after which the execution quits the PZP-CNToperation (S2685 through S2689 represent the foregoing operations)).

When the operation starts from PZP-CNT5, step S2683 is the first step inwhich the PZ pulse count value is cleared, the number of pulses of thepresent focal distance is converted to the present focal distance (mm),and then stored, after which the execution quits the PZP-CNT operation(S2685 through S2689).

When there is an instruction to execute a PZ pulse initializingoperation by the above mentioned PZ-INITPOS command from the body (i.e.,when the body's main power is turned on), the zooming operation isperformed toward the telephoto side. The present position PZ pulse value(PZPX) and the start position (PZPSTRT) can be selected by detecting theabsolute position from the border position of the divisional region whenit exceeds the divisional region of the code plate 71. Further, theoriginal position can also be returned to after the present position hasbeen detected.

While zooming, every time the border of the code plate 71 is exceeded,the absolute number of pulses at the border part is read-in from thetable and compared with the count value. If the difference is greaterthan a predetermined value, calibration (alteration) is effected.

ISZMEMO Operation

The flow chart for the ISZMEMO operation, shown in FIG. 90, is anoperation for storing image magnification values. In other words, it isan operation whereby, the present AF pulse value (AFPX) and the presentfocal length (FCLXL and H) are stored by effecting the zoom speedchanging switch 75 or the set switch (SL switch, SW) when in theconstant image magnification zooming mode. This operation is the detailof S359 in the interrupting routine for a 2 ms timer shown in FIG. 10.

In the preferred embodiment, the AF pulse value and the focal distanceare stored at the time when the zoom ring is returned to the neutralposition, provided an in-focus condition exists, or when the set switchis turned OFF, even if the zoom lens is not at the neutral position.

In the ISZMEMO operation, the image magnification lens memory flag F₋₋ISM is set, and the constant image magnification mode is selected. Theoperation then proceeds to storing operations step S2707 and beyond,provided that the in-focus flag F₋₋ AFIN has been set (S2701 throughS2705). The image magnification lens memory flag F₋₋ ISM is transmittedfrom the body by command PZ-BSTATE(20) and is stored in PZ-BDST.

The image magnification memory flag F₋₋ ISM is usually transmitted afterbeing cleared. Storing of the image magnification memory for the presentAF₋₋ pulse value and the present focal distance is not performed by thelens alone, but is performed when the command ISZ-MEMORY(36) istransmitted from the body. Furthermore, the transmission of the commandISZ-MEMORY(36) takes place when the zoom speed switch 75 has returned tothe neutral position or when the set switch SL is turned OFF after thebody checks Bit 2 (SLSW) of the periodical communication POFF-STATE(11)and Bits 0 and 1 (PTSW and PWSW) of LENS-INF1(13) to determine whetherthe set switch SL (SL switch) and the zoom speed switch 75 are turned ONor OFF.

As explained above, when the flag F₋₋ ISM is set and transmitted, theimage magnification is stored by the lens after determining whether theset switch SL and zoom speed switch 75 are ON or OFF, not by the commandISZ-MEMORY from the body.

When the zoom switch 75 has just been returned to the neutral position,after being in some position other than the neutral position, or whenthe set switch, which was previously ON, has just been turned OFF, thepresent value of the AF pulse is stored at address ISZ-AFPL and H. Thepresent focal distance is then stored at address ISZ-FCLL and H, and theimage magnification calculation instruction flag F₋₋ ISM is set beforethe ISZMEMO operation is terminated (S2707 through S2719).

In other words, the image magnification is stored in the memory at thetime when the zoom switch 75 has returned from the telephoto orwide-angle side to the neutral position, provided that an in-focuscondition exists and the flag F₋₋ ISM has been set, or when the setswitch is turned off.

MTL-CTL Operation

The MTL-CTL flow chart, shown in FIG. 91, is an operation that controlsthe driving operation of the zoom motor 65 corresponding to the zoommotor control flags (i.e., each flag of ZM-ST1) which have been set bythe SET-ST operation. This operation is the detail of S363 in theinterruption routine for the 2-ms timer shown in FIG. 10.

When drive flag F₋₋ DRV has been cleared and when the brake flag F₋₋ BRKhas been set, the brake is applied to the zoom motor 65. When brake flagF₋₋ BRK has been cleared, a 2-ms timer is started after the zoom motor65 is released. Then, the interruption for the 2 ms timer is enabled,and the PWM interruption is disabled before completing the operation(S2801, S2809 through S2813, S2817 and S2819 represent the foregoingoperations).

When the drive flag F₋₋ DRV has been set, and if it is set fortelephoto, the zoom motor 65 drives the lens toward the telephoto end.If it is set for wide-angle, the zoom motor 65 drives the lens towardthe wide-angle end (S2801 through S2807).

When the motor is actuated at the fourth speed (DC drive), the 2 mstimer is started, the 2 ms timer interruption is enabled, and the PWMinterruption is disabled, before completing the operation (S2815, S2817and S2819).

When the motor is driven at the first through fourth speeds, the PWMhard timer is incremented by 1. When the incremental value overflows,the maximum value (FFH) is assigned to the PWM hard timer. If overflowhas not occurred, the incremental value is maintained (S2815, S2821through S2825).

Next, whether the PWM hard timer value (T₋₋ PWM) has exceeded the PWM'sPZ pulse cycle (T₋₋ PWMPLS) is determined (i.e., whether the PZ pulse istransmitted within the PZ pulse cycle time of PWM). If it is exceeded,the duty ratio (T₋₋ PWMBRK) is increased because the pulse has not beentransmitted within the cycle time. If it is not exceeded, the duty ratio(T₋₋ PWMBRK) is set as it is in the hard timer for PWM control, and thehard timer for PWM control is started (S2827 through S2833). Then, the 2ms timer is started, interruption for the 2 ms timer is enabled, and PWMinterruption is enabled before the operation is completed (S2835 andS2837).

Release Operation

The following explains the release operation of the camera body 11, asshown in FIG. 92. This release operation is executed by the main CPU 35,provided that the release switch SWR is turned ON.

First it is determined whether mid-exposure manual power zooming ispossible, based on the data stored in the E² PROM, etc. In response tothe determination, predetermined data is transmitted to the lens by theBODY-STATE1 command (S2901, S2903 and S2905). When mid-exposure manualpower zooming is possible, MPZ disabling flag (MPZD) is cleared, controlzooming halt flag (IPZD) is set, and BODY-STATE1 data, in whichduring-release flag (REL) has been set, is transmitted (S2905). Whenmid-exposure manual power zooming is not possible, MPZ disabling flag(MPZD) is set, control zooming halt flag (IPZD) is set, and BODY-STATE1data, in which during-release flag (REL) has been set, is transmitted(S2903). If it is known through this communication that control zooming(i.e., zooming with constant image magnification or preset zooming) isbeing effected, control zooming is stopped.

In this embodiment, by setting the control zooming halt flag and sendingit to the lens by way of the body state 1 command, substantially thesame action as that which occurs when sending the IPZ-STOP command inthe instruction command can be carried out. However, it is also possibleto stop the zooming by an IPZ-STOP command.

Next, flag F₋₋ IPZB is checked by means of transmission of the PZ₋₋LSTATE command to determine whether control zooming (i.e., zooming withconstant image magnification or preset zooming) has been completed(S2904-1 to 2). Upon completion, flag F₋₋ ISZON for zooming withconstant image magnification and flag F₋₋ IPZON for preset zooming arecleared, and the battery request in the body flag is cleared before thepower supply by the battery is halted (S2904-3 through 6).

Mirror 13 is then lifted up by the mirror motor, and the iris diaphragmis closed by the diaphragm driving mechanism. After these operations arecompleted, it is checked whether mid-exposure zooming is being effectedby operating the first blind of the exposure mechanism 27 (S2907, S2909and S2911). If mid-exposure zooming is being effected, operations insteps S2913 through S2923 are executed.

Mid-exposure Zooming

The operation of mid-exposure zooming will be further explained below,referring to the timing chart in FIG. 93. In mid-exposure zooming, azooming speed is selected in accordance with the exposure time providedthat the exposure time (shutter speed) is longer than a predeterminedtime (e.g. 1/60 seconds). Then, the direction of the power zoom (i.e.,TELE direction or WIDE direction) is selected, power is supplied to thepower zoom lens 51, it is determined whether power is being supplied ina normal manner. Then, a delay equal to one half of the exposure time iseffected, provided that the power supply is normal (S2911, S2913 throughS2923).

When one half of the exposure time has elapsed, the data for zoomingspeed and its direction, which have been set in S2915 and S2917, istransmitted to the power zoom lens 51 by the MOVE-PZMD communicationcommand, power zooming of the power zoom lens 51 is activated, and thefull exposure time is awaited (S2923 through S2927).

Upon expiration of the exposure time (i.e., the second blind finishesrunning), manual power zooming is disabled and mid-exposure zooming ishalted by the BODY-STATE1 communication (S2929). Next, whether themid-exposure zooming has been stopped is determined by checking flagIPZB using the PZ-LSTATE data communication (S2929 through S2931). Whenconfirming a complete stop (IPZB=0), the battery request flag of thebody is cleared, and the power supply from the battery is stopped (S2931through S2933). Then, the mirror motor 33 and the film winding motor 25are driven to retract the mirror and to wind the film, respectively.Manual power zooming is enabled by the BODY-STATE1 communication beforecontrol is returned (S2934 through S2937).

In this preferred embodiment, the exposure time for mid-exposure zoomingis 1/60 second and above. However, the time is not limited to it.Likewise, although the zooming speed is changed according to theexposure time, it does not have to be changed. Although power zooming isstarted after one half of the exposure time has passed, the timing ofthe start and end of power zooming may be decided arbitrarily.

Mode Switching Operation

The power zoom (PZ) mode switching operation of the camera body 11,shown in FIG. 94, will be explained below. This PZ mode switchingoperation is executed in S1507 of the PZ loop operation shown in FIG.60A, and the PZ mode changing operation is executed when the mode switch77 of the photographing lens 51 is operated. In this preferredembodiment, there are five kinds of zooming modes; the manual zooming ormanual-power zooming, constant image magnification zooming, presetzooming, preset zoom setting and mid-exposure zooming modes. In thisflow chart, each mode has a number; No. 0 is the manual zooming ormanual-power zooming mode, No. 1 is the constant image magnificationzooming mode, No. 2 is the preset zooming mode, No. 3 is the presetzooming setting mode, and NO. 4 is the mid-exposure zooming mode.

First, it is determined if the mounted lens is a power zoom lens and ifthe zoom mode is a manual zoom mode or a power zoom mode, if so, it isthen determined if the power zoom lens is a manual power zoom (i.e.,electric motor driven zoom) or auto-power zoom. If the lens is a powerzoom lens, or power zoom lens but not automatic power zoom, the powerzoom mode flag is cleared. The operation maintains these conditions andcontrol is returned (S3001, S3035 and S3039).

If the lens is an auto-power zoom lens, the already preserved mode isretrieved. If it is in the auto-focus mode, no processing takes place.However, if it is not in the auto-focus mode, constant imagemagnification zooming cannot be performed. Therefore, if the retrievedPZ mode is the constant image magnification zooming mode (1), it ischanged to an upper mode. If it is not the PZ mode, no operation takesplace (S3090 through S3013).

Next, when up and down switches SWUP and SWDN are turned ON, a changingoperation of the PZ mode is performed (S3015 through S3029) providedthat the SWAS switch (i.e., zoom mode switch) of the power zoom lens 51is turned ON. For instance, when the down switch SWDN is turned on, thezoom mode is changed upward until it becomes No. 4 (S3017, S3031 andS3033). When the UP switch SWUP is turned ON, the zoom mode is changeddownward until it becomes No. 1. However, when not in the auto-focusmode, constant image magnification is not selected (S3019 throughS3029).

Upon completion of the UP/DOWN operation, the selected mode number ispreserved, control is then returned (S3039). The state of switch SWAS isincluded in the data transmitted by the POFF-STATE communication.

The PZ Pulse Count Interruption Operation

The following explains the PZ pulse count interruption operation shownin FIGS. 95 and 96, which is executed in the photographing lens 51. Thisinterruption takes place at the upright of a PZ pulse output, thecounting of which is performed by software. The interruption may beperformed at the downfall of a pulse, depending on the setting of thelens CPU.

First, the interruption is disabled, and the PZ counter (PZPA2B), whichcounts the PZ pulses in the PZ initializing operation, and the PZ pulsecount value (PZPCNT) are incremented by 1. When the PZ pulse countervalue overflows, the maximum value is entered in the PZ pulse countvalue (S3101 through S3109).

Next, the driving direction of the power zoom lens is checked. If it isin the telephoto direction, the PZ pulse count starting value is addedby the PZ pulse count value and entered into the present PZ pulse value.If it is the wide-angle direction, the PZ pulse count starting value issubtracted by the PZ pulse count value and entered into the present PZpulse value (S3111 through S3115).

Then, when the driving operation is not being performed (F₋₋ DRV=0), theoperation proceeds to the PWM control checking (CHKPWM) in S3117. Whenthe driving operation is being performed, but the constant imagemagnification zooming is being effected, or driving is not towards thetargeted position, the operation proceeds to the PWM control checkingoperation (CHKPWM) in S3117 through S3121. When the constant imagemagnification zooming is being effected or the driving operation istowards the targeted position, the number of the present PZ pulse andthe number of the targeted PZ pulse are not equal, and the operationproceeds to the PWM control checking (CHKPWM). If they are equal, theoperation proceeds to the braking operation (BRAK) to stop the zoommotor immediately (S3117, S3119 and S3123).

The BREAK and CHKPWM Operations

FIG. 96 shows a flow chart regarding the braking operation (BREAKoperation) of the zoom motor and the PWM checking operation. Theseoperations are to reduce the speed of the PZ motor.

In the braking operation, the brake is first applied to the zoom motor(by closing the input terminal of the zoom motor), and the brake data isentered into ZM-ST1. For brake data, F₋₋ BRK is set, flag F₋₋ LMTT andF₋₋ LMTW remain unchanged, and the others are cleared (S3151 and S3153represent these operations).

The PWM timer, the limit timer, and the start timer are cleared. Datafor the present focal distance is obtained from the present PZ pulsevalue (PZPX) and stored in FCLXL and H, after which the interruption isenabled before control is returned (S3155 through S3159).

The CHKPWM operation reduces the duty ratio in the PWM control. When thePWM driving is not in operation, the operation proceeds to S3155 withthe fourth speed (DC) unchanged. When the PWM driving is in operation,if the PWM timer (T-PWM) is less than the PWM pulse cycle (T-PWMPLS),the duty ratio is reduced because the power zooming speed is too high.The operation then proceeds to S3155. If the PWM timer is greater thanthe PWM pulse cycle, the operation proceeds to S3155 without any furtherprocesses (S3161 through S3165 represent the foregoing operations).

Many functions of this preferred embodiment were explained in theforegoing paragraphs. A part or all of these functions may be built intoa single camera system (i.e., a camera body and a photographing lens).

According to the present invention, it is possible to provide variouskinds of controls in the power zoom lens in closer coordination with thecamera body, because communication means to communicate commands anddata with the camera body is built in both the camera body and the powerzoom lens, which is detachably attached to the camera body.

As can be understood from the above explanation, in a single lens reflexcamera having a power zoom lens according to the present invention,since the motor means (zoom motor 69) and the control means (lens CPU61) for controlling the zoom motor are provided in the zoom lens 51, thedrive and control of the zoom motor can be carried out independent ofthe body controller (body CPU 35).

Furthermore, data communication is effected periodically or inaccordance with need, between the lens CPU 61 and the body CPU 35through the interface IC 62 and the circumferential control circuit 23,both of which function as input and output means. As a result of thedata communication between the lens CPU 61 and the body CPU 35 (main CPU35), the power supply is monitored by the main CPU 35. Namely, whetherthe power supply to the zoom motor is normally or appropriately effectedis checked by the lens CPU 61, and the data resulting from the checkingoperation is input to the body CPU. Consequently, if there is an"abnormality", the power supply is cut.

Note that the body CPU 35 functions as a cutting means and the lens CPU61 as an abnormality detecting means, respectively.

The main CPU 35 monitors the power supply during the operation of thezoom motor 69. If there is a problem which causes the power supply to beinappropriately effected, the power supply to the zoom motor 69 is cut.It should be appreciated that the power supply to the lens CPU 61continues even when the power supply to the zoom motor 69 is cut.Accordingly, control operations other than the driving of the zoom motor69 can be carried out. Namely, when the power supply to only the zoommotor 69 is cut, the power zoom lens 51 functions as a manual zoom lens.

Although the battery is provided in the camera body to supply the takinglens with power in the illustrated embodiments, it is possible toprovide the battery in the taking lens to supply the camera body withpower. Furthermore, the present invention is not limited to a camera andcan be generically applied to an apparatus having a power supplier and apower receiver.

                  TABLE 1                                                         ______________________________________                                                  Instruction                                                         I         Name        Instruction Code                                        ______________________________________                                        0         STANDBY     30                                                      1         AF-INITPOS  31                                                      2         PZ-INITPOS  32                                                      3         RETRACT-PZ  33                                                      4         RET-PZPOS   34                                                      5         IPZ-STOP    35                                                      6         ISZ-MEMORY  36                                                      7         ISZ-START   37                                                      ______________________________________                                    

                  TABLE 2                                                         ______________________________________                                                 Instruction                                                          No       Name          Instruction Code                                       ______________________________________                                        0        LROM 16 byte data                                                                           40                                                     1        LROM first half                                                                             41                                                              8 byte data                                                          2        LROM second half                                                                            42                                                              8 byte data                                                          ______________________________________                                    

                                      TABLE 3                                     __________________________________________________________________________                         Data Bit                        dimen-                   BL BL COMMAND                                                                              Command Code                                                                          B7  B6  B5  B4  B3  B2  B1  B0  sion                     __________________________________________________________________________    0  PZ-BSTATE 20      ISM AFif                                                                              Mobj                                                                              ovAF                                                                              toFm                                                                              toNm                                                                              endF                                                                              endN                                                                              --                                    1:      lens                                                                              yes yes yes yes yes yes yes                                       0:      body                                                                              no  no  no  no  no  no  no                           1  BODY-STATE0                                                                             21      mAF swAF                                                                              BATT                                                                              swS Vdd IPZC                                                                              IPZB                                                                              IPZA                                                                              --                                    1:      C   A   yes off on  4   2   1                                         0:      S   M   no  on  off                                      2  BODY-STATE1                                                                             22      ISsp                                                                              ISsp                                                                              ISZD                                                                              AF.sup.-- L                                                                       MPZD                                                                              IPZD                                                                              WIND                                                                              REL --                                            SPB SPA pre on  stop                                                                              Stop                                                                              yes yes                                                       AFx off ena.                                                                              ena.                                                                              no  no                           3  SET-AFPOINT.                                                                            23      ISZM                                                                              FM2 FM1 FM0 X                                        4  SET-PZPOIN.                                                                             24      ISZM                                                                              FM2 FM1 FM0 X                                        5  STORE-AFP 25      ISZM                                                                              AM2 AM1 AM0 2048                                                                              1024                                                                              512 256                                               128 64  32  16  8   4   2   1   Pulse                    6  STORE-DEFP&D                                                                            26      SIGN        4096                                                                              2048                                                                              1024                                                                              512 256                                               128 64  32  16  8   4   2   1   ×4 μm                                            4096                                                                              2048                                                                              1024                                                                              512 256                                               128 64  32  16  8   4   2   1   Pulse                    7  STORE-PZP 27      AFM AM2 AM1 AM0 PZM FM2 FM1 FM0 --                                    1:      memo                                                                              4   2   1   memo                                                                              4   2   1                                         0:      no              no                                       8  STORE-PZF 28      ISAM                                                                              FM2 FM1 FM0     1024                                                                              512 256                                               128 64  32  16  8   4   2   1   mm                       9  STORE-IS  29                      2   1   1/2 1/4                                       1/      8   16  23  64  128 256 512 1024                                                                              times                    A  MOVE-PZMD 2A      SPB SPA MDW MDT MDM MvM2                                                                              MvM1                                                                              MvM0                                                                              --                                    1               wide                                                                              tele                                                                              memo                                                                              4   2   1                                         0:              no  no  no                                       B  MOVE-PZf  2B      SPB SPA             1024                                                                              512 256                                               128 64  32  16  8   4   2   1   mm                       __________________________________________________________________________

                                      TABLE 4                                     __________________________________________________________________________                         Data Bit                        dimen-                   LB LB COMMAND                                                                              Command Code                                                                          B7  B6  B5  B4  B3  B2  B1  B0  sion                     __________________________________________________________________________    0  PZ-LSTATE 10      MPZ ISok                                                                              IPZI                                                                              IPZB                                                                              Wend                                                                              Tend                                                                              Wmov                                                                              Tmov                                                                              --                                    1:      on  ng. int.                                                                              busy                                                                              end end move                                                                              move                                      0:      off ok  ok  end no  no  stop                                                                              stop                         1  POFF-STATE                                                                              11      PH  AFsw                                                                              PZD PZM ASsw                                                                              SLsw                                                                              LBAT                                                                              Bdet                                                                              --                                    1:      Req.                                                                              AF  D   AP  ON  ON  Req.                                                                              on                                        0:      no  M   M       OFF OFF no  off                          2  POFFS-WSLEEP                                                                            12      no                              --                                            avail-                                                                        able                                                     3  LENS-INF1 13      ISmW                                                                              ISmT                                                                              ISdC                                                                              ISdB                                                                              ISdA                                                                              Lens                                                                              PWsw                                                                              PTsw                                                                              --                          (Continue 1:      wide                                                                              tele            A   wide                                                                              tele                                      0:      no  no  1/2 1/4 1/8 M   off off                          4  LENS-INF2 14      exPZ                                                                              exAF                                                                              exAE                                                                              exB rePZ                                                                              reAF                                                                              verB                                                                              verA                                                                              --                                    1:      yes yes yes yes ok  ok  2   1                                         0:      no  no  no  no  ng  ng                                   5  LENS-AFPULSE                                                                            15                      2048                                                                              1024                                                                              512 256                                               128 64  32  16  8   4   2   1   Pulse                    6  FOCALLEN-X                                                                              16                          1024                                                                              512 256                                               128 64  32  16  8   4   2   1   mm                       7  IMAGE-LSIZE                                                                             17                      2   1   1/2 1/4                                       1/      8   16  32  64  128 256 512 1024                                                                              times                    __________________________________________________________________________

                                      TABLE 5                                     __________________________________________________________________________     ##STR1##                                                                      ##STR2##                                                                      ##STR3##                                                                      ##STR4##                                                                      ##STR5##                                                                      ##STR6##                                                                      ##STR7##                                                                      ##STR8##                                                                     __________________________________________________________________________

    TABLE 6      ##STR9##      ##STR10##      ##STR11##      ##STR12##      ##STR13##      ##STR14##      ##STR15##      ##STR16##

                                      TABLE 7                                     __________________________________________________________________________     ##STR17##                                                                     ##STR18##                                                                     ##STR19##                                                                     ##STR20##                                                                     ##STR21##                                                                     ##STR22##                                                                     ##STR23##                                                                     ##STR24##                                                                    __________________________________________________________________________

                                      TABLE 8                                     __________________________________________________________________________     ##STR25##                                                                     ##STR26##                                                                     ##STR27##                                                                     ##STR28##                                                                     ##STR29##                                                                     ##STR30##                                                                     ##STR31##                                                                     ##STR32##                                                                    __________________________________________________________________________

                                      TABLE 9                                     __________________________________________________________________________     ##STR33##                                                                     ##STR34##                                                                     ##STR35##                                                                     ##STR36##                                                                     ##STR37##                                                                     ##STR38##                                                                     ##STR39##                                                                     ##STR40##                                                                    __________________________________________________________________________

                                      TABLE 10                                    __________________________________________________________________________     ##STR41##                                                                     ##STR42##                                                                     ##STR43##                                                                     ##STR44##                                                                     ##STR45##                                                                     ##STR46##                                                                     ##STR47##                                                                     ##STR48##                                                                    __________________________________________________________________________

                                      TABLE 11                                    __________________________________________________________________________     ##STR49##                                                                     ##STR50##                                                                     ##STR51##                                                                     ##STR52##                                                                     ##STR53##                                                                     ##STR54##                                                                     ##STR55##                                                                     ##STR56##                                                                    __________________________________________________________________________

We claim:
 1. A camera system including a taking lens having a motordrive means and a control means for controlling the motor drive means,and a camera body to which the taking lens is detachably mounted,comprising:a power supply provided in the camera body; power supplyingcircuits provided in the camera body and the taking lens toindependently supply the motor drive means and the control means withthe electrical power of said power supply; abnormal power supplydetecting means in the taking lens for detecting an abnormality of thepower supply to the motor drive means; and power cutting means in thecamera body for cutting the power supply to the motor drive means whensaid abnormal power supply detecting means detects an abnormality ofsaid power supply.
 2. A camera system according to claim 1, wherein saidpower supply comprises a battery.
 3. A camera system according to claim1, wherein the camera body comprises independent electrical contactterminals through which the drive power and a constant voltage of drivepower are supplied to the motor drive means and the control means,respectively.
 4. A camera system according to claim 3, wherein thetaking lens comprises a power zoom lens having a zooming lens unit and azoom mechanism which supports said zooming lens unit to move in anoptical axis direction.
 5. A camera system according to claim 4, whereinthe motor drive means comprises a zoom motor which drives said zoommechanism to said zooming lens unit.
 6. A camera system according toclaim 5, wherein said control means of the taking lens and said abnormalpower supply detecting means are included in a lens CPU.
 7. A camerasystem according to claim 6, wherein said lens CPU detects anabnormality of the power supply based on a voltage of said electricalcontact terminals for the motor drive means.
 8. A camera systemaccording to claim 7, wherein said lens CPU comprises clock means forgenerating clock signals.
 9. A camera system according to claim 8,wherein said power zoom lens and said camera body comprise input andoutput means through which data is inputted and outputted synchronouslywith the clock signals of said clock means of said zoom lens.
 10. Acamera system according to claim 9, wherein said camera body comprises abattery which supplies drive power and constant voltage drive power forsaid motor drive means and the control means to the power zoom lens,respectively.
 11. A camera system according to claim 10, wherein saidcamera body comprises independent electrical contact terminals throughwhich drive power and the constant voltage drive power for the motordrive means and the control means are supplied to said power zoom lens,respectively.
 12. A camera system according to claim 11, wherein saidcamera body comprises a body controller for checking whether or notpower for the motor drive means is supplied to the control means of thetaking lens.
 13. A camera system according to claim 12, wherein saidbody controller cuts the power supply for the motor drive means when itdetects that power is not being supplied to the control means of thetaking lens in an appropriate manner.
 14. A camera system according toclaim 13, wherein said body controller permits supply of said drivepower to the motor drive means when it receives a power supply demandsignal from said lens CPU.